Page MenuHomePhabricator

define XML namespace for XML dumps
Closed, InvalidPublic

Description

It would be useful to define an XML namespace for thze XML dump format. This would allow us to embed elements from that output in other XML documents easily.

There is already an XML schema defined for this output, adding a namespace would be trivial. It could even use the same URI: http://www.mediawiki.org/xml/export-0.4

In practice, this would mean that the top level <mediawiki> tag returned
by the exporter would become:

<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.4" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.4/ http://www.mediawiki.org/xml/export-0.4.xsd" version="0.4" xml:lang="de">

This should have no impact whatsoever on backward compatibility, except perhaps
for programs processing the XML using naive regular expressions. I believe it
would be ok to break those, since they rely on things that are never guaranteed
in XML.


Version: 1.17.x
Severity: enhancement

Details

Reference
bz24784

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:09 PM
bzimport set Reference to bz24784.
bzimport added a subscriber: Unknown Object (MLST).

actually, if i understand xsi:schemaLocation correctly, it already sais that
http://www.mediawiki.org/xml/export-0.4.xsd is the schema for namespace http://www.mediawiki.org/xml/export-0.4/. However, as far as I know, the namespace would still need to be applied to the present XML document explicitly, using an xmlns attribute.

Umm, the dumps I'm looking at have http://www.mediawiki.org/xml/export-0.4 as their namespace... (I looked at both special:export output, and chwikibooks dumps)

Ahhhh! Firefoxes pretty XML formatting thingy hides the namespace attributes! ugh. closing as invalid. sorry folks :)