Last modified: 2014-11-03 13:34:07 UTC
According to export-0.9.xsd, the <model> and <format> tags follow the <text> tag. That is however quite annoying when processing the XML event stream, since it means we do not know how to process the contents of the <text> tag when we receive it. Adding <model> and <format> at the end was simply an oversight on my part when I introduced them. Outputting these tags before the <text> tag would be simple to do, but would technically be a breaking change to the export format. I see no good way to make this backwards compatible, aside from outputting these tags twice. As a stop gap, model and format could be included as attributes of the <text> tag. This is however rather inconsistent with the rest of the format, and would also need to be included in a new version of the XSD.
Point in case: bug 72361 would be a lot easier to fix if model and format would appear before text in the xml event stream.
Do Special:Import and importDump.php care about the order of XML tags? I hope not, but they don't always behave logically. :)
Change 168583 had a related patch set uploaded by Daniel Kinzler: Move <model> and <format> tags in XML dumps. https://gerrit.wikimedia.org/r/168583
Would this also break `mwxml2sql'?
Change 168583 merged by jenkins-bot: Change position of <model> and <format> tags in XML dumps. https://gerrit.wikimedia.org/r/168583