110 if self.pdata["EOL"] and self.pdata["EOL"][0]: |
110 if self.pdata["EOL"] and self.pdata["EOL"][0]: |
111 self.writeEmptyElement("Eol") |
111 self.writeEmptyElement("Eol") |
112 self.writeAttribute("index", str(int(self.pdata["EOL"][0]))) |
112 self.writeAttribute("index", str(int(self.pdata["EOL"][0]))) |
113 |
113 |
114 # do the sources |
114 # do the sources |
115 # TODO: write in sorted order |
|
116 self.writeStartElement("Sources") |
115 self.writeStartElement("Sources") |
117 for name in self.pdata["SOURCES"]: |
116 for name in sorted(self.pdata["SOURCES"]): |
118 self.writeTextElement( |
117 self.writeTextElement( |
119 "Source", Utilities.fromNativeSeparators(name)) |
118 "Source", Utilities.fromNativeSeparators(name)) |
120 self.writeEndElement() |
119 self.writeEndElement() |
121 |
120 |
122 # do the forms |
121 # do the forms |
123 # TODO: write in sorted order |
|
124 self.writeStartElement("Forms") |
122 self.writeStartElement("Forms") |
125 for name in self.pdata["FORMS"]: |
123 for name in sorted(self.pdata["FORMS"]): |
126 self.writeTextElement("Form", Utilities.fromNativeSeparators(name)) |
124 self.writeTextElement("Form", Utilities.fromNativeSeparators(name)) |
127 self.writeEndElement() |
125 self.writeEndElement() |
128 |
126 |
129 # do the translations |
127 # do the translations |
130 # TODO: write in sorted order |
|
131 self.writeStartElement("Translations") |
128 self.writeStartElement("Translations") |
132 for name in self.pdata["TRANSLATIONS"]: |
129 for name in sorted(self.pdata["TRANSLATIONS"]): |
133 self.writeTextElement( |
130 self.writeTextElement( |
134 "Translation", Utilities.fromNativeSeparators(name)) |
131 "Translation", Utilities.fromNativeSeparators(name)) |
135 self.writeEndElement() |
132 self.writeEndElement() |
136 |
133 |
137 # do the translation exceptions |
134 # do the translation exceptions |
138 # TODO: write in sorted order |
|
139 if self.pdata["TRANSLATIONEXCEPTIONS"]: |
135 if self.pdata["TRANSLATIONEXCEPTIONS"]: |
140 self.writeStartElement("TranslationExceptions") |
136 self.writeStartElement("TranslationExceptions") |
141 for name in self.pdata["TRANSLATIONEXCEPTIONS"]: |
137 for name in sorted(self.pdata["TRANSLATIONEXCEPTIONS"]): |
142 self.writeTextElement( |
138 self.writeTextElement( |
143 "TranslationException", |
139 "TranslationException", |
144 Utilities.fromNativeSeparators(name)) |
140 Utilities.fromNativeSeparators(name)) |
145 self.writeEndElement() |
141 self.writeEndElement() |
146 |
142 |
147 # do the resources |
143 # do the resources |
148 # TODO: write in sorted order |
|
149 self.writeStartElement("Resources") |
144 self.writeStartElement("Resources") |
150 for name in self.pdata["RESOURCES"]: |
145 for name in sorted(self.pdata["RESOURCES"]): |
151 self.writeTextElement( |
146 self.writeTextElement( |
152 "Resource", Utilities.fromNativeSeparators(name)) |
147 "Resource", Utilities.fromNativeSeparators(name)) |
153 self.writeEndElement() |
148 self.writeEndElement() |
154 |
149 |
155 # do the interfaces (IDL) |
150 # do the interfaces (IDL) |
156 # TODO: write in sorted order |
|
157 self.writeStartElement("Interfaces") |
151 self.writeStartElement("Interfaces") |
158 for name in self.pdata["INTERFACES"]: |
152 for name in sorted(self.pdata["INTERFACES"]): |
159 self.writeTextElement( |
153 self.writeTextElement( |
160 "Interface", Utilities.fromNativeSeparators(name)) |
154 "Interface", Utilities.fromNativeSeparators(name)) |
161 self.writeEndElement() |
155 self.writeEndElement() |
162 |
156 |
163 # do the others |
157 # do the others |
164 # TODO: write in sorted order |
|
165 self.writeStartElement("Others") |
158 self.writeStartElement("Others") |
166 for name in self.pdata["OTHERS"]: |
159 for name in sorted(self.pdata["OTHERS"]): |
167 self.writeTextElement( |
160 self.writeTextElement( |
168 "Other", Utilities.fromNativeSeparators(name)) |
161 "Other", Utilities.fromNativeSeparators(name)) |
169 self.writeEndElement() |
162 self.writeEndElement() |
170 |
163 |
171 # do the main script |
164 # do the main script |