Adding MediaWiki Export XML Schema Descriptions to track changes and add support accordingly

git-svn-id: https://wikiteam.googlecode.com/svn/trunk@876 31edc4fc-5e31-b4c4-d58b-c8bc928bcb95
pull/117/head
Hydriz 11 years ago
parent 8680a55e24
commit 5bed9cb28e

@ -0,0 +1,27 @@
MediaWiki XML Schema Descriptions
=================================
This folder stores all the MediaWiki XML Schema Descriptions (XSD) and the differences between versions. This is useful for ensuring the compatibility of DumpGenerator to create dumps following the format of what MediaWiki provides via Special:Export.
DumpGenerator currently supports Schema versions 0.3 till 0.8.
Below is a list of the MediaWiki version that each XSD was introduced:
| Schema version | MediaWiki version |
| -------------- | ------------------ |
| 0.8 | 1.21 |
| 0.7 | 1.20 |
| 0.6 | 1.19 |
| 0.5 | 1.18 |
| 0.4 | 1.16 |
| 0.3 | 1.5 |
| 0.2 | unknown |
| 0.1 | 1.5 |
*Note: It is unknown whether version 0.2 of the XSD was actually used by MediaWiki in exporting, since 0.3 followed immediately after 0.1*
For versions before MediaWiki 1.5, it is possible that no XML Schema Description was provided during the export, and since the backend database was changed at MediaWiki 1.5, DumpGenerator hence will not provide support for downloading an XML export of wikis before that version.
We **strongly encourage** system administrators who are still using MediaWiki 1.4 and earlier to upgrade so that DumpGenerator can create a proper dump of the wiki using XML. If it is not possible, we advice using [wget-warc][1] and downloading a complete copy of the wiki in HTML form in the Web ARChive format.
[1]: http://www.archiveteam.org/index.php?title=Wget_with_WARC_output

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
This is an XML Schema description of the format
output by MediaWiki's Special:Export system.
The canonical URL to the schema document is:
http://www.mediawiki.org/xml/export-0.1.xsd
Use the namespace:
http://www.mediawiki.org/xml/export-0.1/
-->
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:mw="http://www.mediawiki.org/xml/export-0.1/"
targetNamespace="http://www.mediawiki.org/xml/export-0.1/"
elementFormDefault="qualified">
<annotation>
<documentation xml:lang="en">
MediaWiki's page export format
</documentation>
</annotation>
<!-- Need this to reference xml:lang -->
<import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/xml.xsd"/>
<!-- Our root element -->
<element name="mediawiki" type="mw:MediaWikiType"/>
<complexType name="MediaWikiType">
<sequence>
<element name="page" type="mw:PageType"
minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="version" type="string" use="required"/>
<attribute ref="xml:lang" use="required"/>
</complexType>
<complexType name="PageType">
<sequence>
<!-- Title in text form. (Using spaces, not underscores; with namespace ) -->
<element name="title" type="string"/>
<!-- optional page ID number -->
<element name="id" type="positiveInteger" minOccurs="0"/>
<!-- comma-separated list of string tokens, if present -->
<element name="restrictions" type="string" minOccurs="0"/>
<!-- Zero or more sets of revision data -->
<element name="revision" type="mw:RevisionType"
minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="RevisionType">
<sequence>
<element name="id" type="positiveInteger" minOccurs="0"/>
<element name="timestamp" type="dateTime"/>
<element name="contributor" type="mw:ContributorType"/>
<element name="minor" minOccurs="0" />
<element name="comment" type="string" minOccurs="0"/>
<element name="text" type="string"/>
</sequence>
</complexType>
<complexType name="ContributorType">
<sequence>
<element name="username" type="string" minOccurs="0"/>
<element name="id" type="positiveInteger" minOccurs="0" />
<element name="ip" type="string" minOccurs="0"/>
</sequence>
</complexType>
</schema>

@ -0,0 +1,48 @@
5a6,8
> Version 0.2 adds optional basic file upload info support,
> which is used by our OAI export/import submodule.
>
7c10
< http://www.mediawiki.org/xml/export-0.1.xsd
---
> http://www.mediawiki.org/xml/export-0.2.xsd
10c13
< http://www.mediawiki.org/xml/export-0.1/
---
> http://www.mediawiki.org/xml/export-0.2/
13,14c16,17
< xmlns:mw="http://www.mediawiki.org/xml/export-0.1/"
< targetNamespace="http://www.mediawiki.org/xml/export-0.1/"
---
> xmlns:mw="http://www.mediawiki.org/xml/export-0.2/"
> targetNamespace="http://www.mediawiki.org/xml/export-0.2/"
50,52c53,57
< <!-- Zero or more sets of revision data -->
< <element name="revision" type="mw:RevisionType"
< minOccurs="0" maxOccurs="unbounded"/>
---
> <!-- Zero or more sets of revision or upload data -->
> <choice minOccurs="0" maxOccurs="unbounded">
> <element name="revision" type="mw:RevisionType" />
> <element name="upload" type="mw:UploadType" />
> </choice>
72a78,96
> </sequence>
> </complexType>
>
> <complexType name="UploadType">
> <sequence>
> <!-- Revision-style data... -->
> <element name="timestamp" type="dateTime"/>
> <element name="contributor" type="mw:ContributorType"/>
> <element name="comment" type="string" minOccurs="0"/>
>
> <!-- Filename. (Using underscores, not spaces. No 'Image:' namespace marker.) -->
> <element name="filename" type="string"/>
>
> <!-- URI at which this resource can be obtained -->
> <element name="src" type="anyURI"/>
>
> <element name="size" type="positiveInteger" />
>
> <!-- TODO: add other metadata fields -->

@ -0,0 +1,100 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
This is an XML Schema description of the format
output by MediaWiki's Special:Export system.
Version 0.2 adds optional basic file upload info support,
which is used by our OAI export/import submodule.
The canonical URL to the schema document is:
http://www.mediawiki.org/xml/export-0.2.xsd
Use the namespace:
http://www.mediawiki.org/xml/export-0.2/
-->
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:mw="http://www.mediawiki.org/xml/export-0.2/"
targetNamespace="http://www.mediawiki.org/xml/export-0.2/"
elementFormDefault="qualified">
<annotation>
<documentation xml:lang="en">
MediaWiki's page export format
</documentation>
</annotation>
<!-- Need this to reference xml:lang -->
<import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/xml.xsd"/>
<!-- Our root element -->
<element name="mediawiki" type="mw:MediaWikiType"/>
<complexType name="MediaWikiType">
<sequence>
<element name="page" type="mw:PageType"
minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="version" type="string" use="required"/>
<attribute ref="xml:lang" use="required"/>
</complexType>
<complexType name="PageType">
<sequence>
<!-- Title in text form. (Using spaces, not underscores; with namespace ) -->
<element name="title" type="string"/>
<!-- optional page ID number -->
<element name="id" type="positiveInteger" minOccurs="0"/>
<!-- comma-separated list of string tokens, if present -->
<element name="restrictions" type="string" minOccurs="0"/>
<!-- Zero or more sets of revision or upload data -->
<choice minOccurs="0" maxOccurs="unbounded">
<element name="revision" type="mw:RevisionType" />
<element name="upload" type="mw:UploadType" />
</choice>
</sequence>
</complexType>
<complexType name="RevisionType">
<sequence>
<element name="id" type="positiveInteger" minOccurs="0"/>
<element name="timestamp" type="dateTime"/>
<element name="contributor" type="mw:ContributorType"/>
<element name="minor" minOccurs="0" />
<element name="comment" type="string" minOccurs="0"/>
<element name="text" type="string"/>
</sequence>
</complexType>
<complexType name="ContributorType">
<sequence>
<element name="username" type="string" minOccurs="0"/>
<element name="id" type="positiveInteger" minOccurs="0" />
<element name="ip" type="string" minOccurs="0"/>
</sequence>
</complexType>
<complexType name="UploadType">
<sequence>
<!-- Revision-style data... -->
<element name="timestamp" type="dateTime"/>
<element name="contributor" type="mw:ContributorType"/>
<element name="comment" type="string" minOccurs="0"/>
<!-- Filename. (Using underscores, not spaces. No 'Image:' namespace marker.) -->
<element name="filename" type="string"/>
<!-- URI at which this resource can be obtained -->
<element name="src" type="anyURI"/>
<element name="size" type="positiveInteger" />
<!-- TODO: add other metadata fields -->
</sequence>
</complexType>
</schema>

@ -0,0 +1,76 @@
8a9,11
> Version 0.3 adds some site configuration information such
> as a list of defined namespaces.
>
10c13
< http://www.mediawiki.org/xml/export-0.2.xsd
---
> http://www.mediawiki.org/xml/export-0.3.xsd
13c16
< http://www.mediawiki.org/xml/export-0.2/
---
> http://www.mediawiki.org/xml/export-0.3/
16,17c19,20
< xmlns:mw="http://www.mediawiki.org/xml/export-0.2/"
< targetNamespace="http://www.mediawiki.org/xml/export-0.2/"
---
> xmlns:mw="http://www.mediawiki.org/xml/export-0.3/"
> targetNamespace="http://www.mediawiki.org/xml/export-0.3/"
34a38,39
> <element name="siteinfo" type="mw:SiteInfoType"
> minOccurs="0" maxOccurs="1"/>
41a47,87
> <complexType name="SiteInfoType">
> <sequence>
> <element name="sitename" type="string" minOccurs="0" />
> <element name="base" type="anyURI" minOccurs="0" />
> <element name="generator" type="string" minOccurs="0" />
> <element name="case" type="mw:CaseType" minOccurs="0" />
> <element name="namespaces" type="mw:NamespacesType" minOccurs="0" />
> </sequence>
> </complexType>
>
> <simpleType name="CaseType">
> <restriction base="NMTOKEN">
> <!-- Cannot have two titles differing only by case of first letter. -->
> <!-- Default behavior through 1.5, $wgCapitalLinks = true -->
> <enumeration value="first-letter" />
>
> <!-- Complete title is case-sensitive -->
> <!-- Behavior when $wgCapitalLinks = false -->
> <enumeration value="case-sensitive" />
>
> <!-- Cannot have two titles differing only by case. -->
> <!-- Not yet implemented as of MediaWiki 1.5 -->
> <enumeration value="case-insensitive" />
> </restriction>
> </simpleType>
>
> <complexType name="NamespacesType">
> <sequence>
> <element name="namespace" type="mw:NamespaceType"
> minOccurs="0" maxOccurs="unbounded" />
> </sequence>
> </complexType>
>
> <complexType name="NamespaceType">
> <simpleContent>
> <extension base="string">
> <attribute name="key" type="integer" />
> </extension>
> </simpleContent>
> </complexType>
>
68c114
< <element name="text" type="string"/>
---
> <element name="text" type="mw:TextType" />
69a116,123
> </complexType>
>
> <complexType name="TextType">
> <simpleContent>
> <extension base="string">
> <attribute ref="xml:space" use="optional" default="preserve" />
> </extension>
> </simpleContent>

@ -0,0 +1,154 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
This is an XML Schema description of the format
output by MediaWiki's Special:Export system.
Version 0.2 adds optional basic file upload info support,
which is used by our OAI export/import submodule.
Version 0.3 adds some site configuration information such
as a list of defined namespaces.
The canonical URL to the schema document is:
http://www.mediawiki.org/xml/export-0.3.xsd
Use the namespace:
http://www.mediawiki.org/xml/export-0.3/
-->
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:mw="http://www.mediawiki.org/xml/export-0.3/"
targetNamespace="http://www.mediawiki.org/xml/export-0.3/"
elementFormDefault="qualified">
<annotation>
<documentation xml:lang="en">
MediaWiki's page export format
</documentation>
</annotation>
<!-- Need this to reference xml:lang -->
<import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/xml.xsd"/>
<!-- Our root element -->
<element name="mediawiki" type="mw:MediaWikiType"/>
<complexType name="MediaWikiType">
<sequence>
<element name="siteinfo" type="mw:SiteInfoType"
minOccurs="0" maxOccurs="1"/>
<element name="page" type="mw:PageType"
minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="version" type="string" use="required"/>
<attribute ref="xml:lang" use="required"/>
</complexType>
<complexType name="SiteInfoType">
<sequence>
<element name="sitename" type="string" minOccurs="0" />
<element name="base" type="anyURI" minOccurs="0" />
<element name="generator" type="string" minOccurs="0" />
<element name="case" type="mw:CaseType" minOccurs="0" />
<element name="namespaces" type="mw:NamespacesType" minOccurs="0" />
</sequence>
</complexType>
<simpleType name="CaseType">
<restriction base="NMTOKEN">
<!-- Cannot have two titles differing only by case of first letter. -->
<!-- Default behavior through 1.5, $wgCapitalLinks = true -->
<enumeration value="first-letter" />
<!-- Complete title is case-sensitive -->
<!-- Behavior when $wgCapitalLinks = false -->
<enumeration value="case-sensitive" />
<!-- Cannot have two titles differing only by case. -->
<!-- Not yet implemented as of MediaWiki 1.5 -->
<enumeration value="case-insensitive" />
</restriction>
</simpleType>
<complexType name="NamespacesType">
<sequence>
<element name="namespace" type="mw:NamespaceType"
minOccurs="0" maxOccurs="unbounded" />
</sequence>
</complexType>
<complexType name="NamespaceType">
<simpleContent>
<extension base="string">
<attribute name="key" type="integer" />
</extension>
</simpleContent>
</complexType>
<complexType name="PageType">
<sequence>
<!-- Title in text form. (Using spaces, not underscores; with namespace ) -->
<element name="title" type="string"/>
<!-- optional page ID number -->
<element name="id" type="positiveInteger" minOccurs="0"/>
<!-- comma-separated list of string tokens, if present -->
<element name="restrictions" type="string" minOccurs="0"/>
<!-- Zero or more sets of revision or upload data -->
<choice minOccurs="0" maxOccurs="unbounded">
<element name="revision" type="mw:RevisionType" />
<element name="upload" type="mw:UploadType" />
</choice>
</sequence>
</complexType>
<complexType name="RevisionType">
<sequence>
<element name="id" type="positiveInteger" minOccurs="0"/>
<element name="timestamp" type="dateTime"/>
<element name="contributor" type="mw:ContributorType"/>
<element name="minor" minOccurs="0" />
<element name="comment" type="string" minOccurs="0"/>
<element name="text" type="mw:TextType" />
</sequence>
</complexType>
<complexType name="TextType">
<simpleContent>
<extension base="string">
<attribute ref="xml:space" use="optional" default="preserve" />
</extension>
</simpleContent>
</complexType>
<complexType name="ContributorType">
<sequence>
<element name="username" type="string" minOccurs="0"/>
<element name="id" type="positiveInteger" minOccurs="0" />
<element name="ip" type="string" minOccurs="0"/>
</sequence>
</complexType>
<complexType name="UploadType">
<sequence>
<!-- Revision-style data... -->
<element name="timestamp" type="dateTime"/>
<element name="contributor" type="mw:ContributorType"/>
<element name="comment" type="string" minOccurs="0"/>
<!-- Filename. (Using underscores, not spaces. No 'Image:' namespace marker.) -->
<element name="filename" type="string"/>
<!-- URI at which this resource can be obtained -->
<element name="src" type="anyURI"/>
<element name="size" type="positiveInteger" />
<!-- TODO: add other metadata fields -->
</sequence>
</complexType>
</schema>

@ -0,0 +1,96 @@
11a12,15
> Version 0.4 adds per-revision delete flags, log exports,
> discussion threading data, a per-page redirect flag, and
> per-namespace capitalization.
>
13c17
< http://www.mediawiki.org/xml/export-0.3.xsd
---
> http://www.mediawiki.org/xml/export-0.4.xsd
16c20
< http://www.mediawiki.org/xml/export-0.3/
---
> http://www.mediawiki.org/xml/export-0.4/
19,20c23,24
< xmlns:mw="http://www.mediawiki.org/xml/export-0.3/"
< targetNamespace="http://www.mediawiki.org/xml/export-0.3/"
---
> xmlns:mw="http://www.mediawiki.org/xml/export-0.4/"
> targetNamespace="http://www.mediawiki.org/xml/export-0.4/"
67,68c71,72
< <!-- Cannot have two titles differing only by case. -->
< <!-- Not yet implemented as of MediaWiki 1.5 -->
---
> <!-- Cannot have non-case senstitive titles eg [[FOO]] == [[Foo]] -->
> <!-- Not yet implemented as of MediaWiki 1.18 -->
72a77,82
> <simpleType name="DeletedFlagType">
> <restriction base="NMTOKEN">
> <enumeration value="deleted"/>
> </restriction>
> </simpleType>
>
83a94
> <attribute name="case" type="mw:CaseType" />
95a107,109
> <!-- flag if the current revision is a redirect -->
> <element name="redirect" minOccurs="0"/>
>
102a117
> <element name="logitem" type="mw:LogItemType" />
103a119,121
>
> <!-- Zero or One sets of discussion threading data -->
> <element name="discussionthreadinginfo" minOccurs="0" maxOccurs="1" type="mw:DiscussionThreadingInfo" />
113c131
< <element name="comment" type="string" minOccurs="0"/>
---
> <element name="comment" type="mw:CommentType" minOccurs="0"/>
117a136,157
> <complexType name="LogItemType">
> <sequence>
> <element name="id" type="positiveInteger" minOccurs="0"/>
> <element name="timestamp" type="dateTime"/>
> <element name="contributor" type="mw:ContributorType"/>
> <element name="comment" type="mw:CommentType" minOccurs="0"/>
> <element name="type" type="string" />
> <element name="action" type="string" />
> <element name="text" type="mw:TextType" />
> </sequence>
> </complexType>
>
> <complexType name="CommentType">
> <simpleContent>
> <extension base="string">
> <!-- This allows deleted=deleted on non-empty elements, but XSD is not omnipotent -->
> <attribute name="deleted" use="optional" type="mw:DeletedFlagType"/>
> </extension>
> </simpleContent>
> </complexType>
>
>
121a162,167
> <!-- This allows deleted=deleted on non-empty elements, but XSD is not omnipotent -->
> <attribute name="deleted" use="optional" type="mw:DeletedFlagType"/>
> <!-- This isn't a good idea; we should be using "ID" instead of "NMTOKEN" -->
> <!-- However, "NMTOKEN" is strictest definition that is both compatible with existing -->
> <!-- usage ([0-9]+) and with the "ID" type. -->
> <attribute name="id" type="NMTOKEN"/>
132a179,180
> <!-- This allows deleted=deleted on non-empty elements, but XSD is not omnipotent -->
> <attribute name="deleted" use="optional" type="mw:DeletedFlagType"/>
150a199,212
> </sequence>
> </complexType>
>
> <!-- Discussion threading data for LiquidThreads -->
> <complexType name="DiscussionThreadingInfo">
> <sequence>
> <element name="ThreadSubject" type="string" />
> <element name="ThreadParent" type="positiveInteger" />
> <element name="ThreadAncestor" type="positiveInteger" />
> <element name="ThreadPage" type="string" />
> <element name="ThreadID" type="positiveInteger" />
> <element name="ThreadAuthor" type="string" />
> <element name="ThreadEditStatus" type="string" />
> <element name="ThreadType" type="string" />

@ -0,0 +1,216 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
This is an XML Schema description of the format
output by MediaWiki's Special:Export system.
Version 0.2 adds optional basic file upload info support,
which is used by our OAI export/import submodule.
Version 0.3 adds some site configuration information such
as a list of defined namespaces.
Version 0.4 adds per-revision delete flags, log exports,
discussion threading data, a per-page redirect flag, and
per-namespace capitalization.
The canonical URL to the schema document is:
http://www.mediawiki.org/xml/export-0.4.xsd
Use the namespace:
http://www.mediawiki.org/xml/export-0.4/
-->
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:mw="http://www.mediawiki.org/xml/export-0.4/"
targetNamespace="http://www.mediawiki.org/xml/export-0.4/"
elementFormDefault="qualified">
<annotation>
<documentation xml:lang="en">
MediaWiki's page export format
</documentation>
</annotation>
<!-- Need this to reference xml:lang -->
<import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/xml.xsd"/>
<!-- Our root element -->
<element name="mediawiki" type="mw:MediaWikiType"/>
<complexType name="MediaWikiType">
<sequence>
<element name="siteinfo" type="mw:SiteInfoType"
minOccurs="0" maxOccurs="1"/>
<element name="page" type="mw:PageType"
minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="version" type="string" use="required"/>
<attribute ref="xml:lang" use="required"/>
</complexType>
<complexType name="SiteInfoType">
<sequence>
<element name="sitename" type="string" minOccurs="0" />
<element name="base" type="anyURI" minOccurs="0" />
<element name="generator" type="string" minOccurs="0" />
<element name="case" type="mw:CaseType" minOccurs="0" />
<element name="namespaces" type="mw:NamespacesType" minOccurs="0" />
</sequence>
</complexType>
<simpleType name="CaseType">
<restriction base="NMTOKEN">
<!-- Cannot have two titles differing only by case of first letter. -->
<!-- Default behavior through 1.5, $wgCapitalLinks = true -->
<enumeration value="first-letter" />
<!-- Complete title is case-sensitive -->
<!-- Behavior when $wgCapitalLinks = false -->
<enumeration value="case-sensitive" />
<!-- Cannot have non-case senstitive titles eg [[FOO]] == [[Foo]] -->
<!-- Not yet implemented as of MediaWiki 1.18 -->
<enumeration value="case-insensitive" />
</restriction>
</simpleType>
<simpleType name="DeletedFlagType">
<restriction base="NMTOKEN">
<enumeration value="deleted"/>
</restriction>
</simpleType>
<complexType name="NamespacesType">
<sequence>
<element name="namespace" type="mw:NamespaceType"
minOccurs="0" maxOccurs="unbounded" />
</sequence>
</complexType>
<complexType name="NamespaceType">
<simpleContent>
<extension base="string">
<attribute name="key" type="integer" />
<attribute name="case" type="mw:CaseType" />
</extension>
</simpleContent>
</complexType>
<complexType name="PageType">
<sequence>
<!-- Title in text form. (Using spaces, not underscores; with namespace ) -->
<element name="title" type="string"/>
<!-- optional page ID number -->
<element name="id" type="positiveInteger" minOccurs="0"/>
<!-- flag if the current revision is a redirect -->
<element name="redirect" minOccurs="0"/>
<!-- comma-separated list of string tokens, if present -->
<element name="restrictions" type="string" minOccurs="0"/>
<!-- Zero or more sets of revision or upload data -->
<choice minOccurs="0" maxOccurs="unbounded">
<element name="revision" type="mw:RevisionType" />
<element name="upload" type="mw:UploadType" />
<element name="logitem" type="mw:LogItemType" />
</choice>
<!-- Zero or One sets of discussion threading data -->
<element name="discussionthreadinginfo" minOccurs="0" maxOccurs="1" type="mw:DiscussionThreadingInfo" />
</sequence>
</complexType>
<complexType name="RevisionType">
<sequence>
<element name="id" type="positiveInteger" minOccurs="0"/>
<element name="timestamp" type="dateTime"/>
<element name="contributor" type="mw:ContributorType"/>
<element name="minor" minOccurs="0" />
<element name="comment" type="mw:CommentType" minOccurs="0"/>
<element name="text" type="mw:TextType" />
</sequence>
</complexType>
<complexType name="LogItemType">
<sequence>
<element name="id" type="positiveInteger" minOccurs="0"/>
<element name="timestamp" type="dateTime"/>
<element name="contributor" type="mw:ContributorType"/>
<element name="comment" type="mw:CommentType" minOccurs="0"/>
<element name="type" type="string" />
<element name="action" type="string" />
<element name="text" type="mw:TextType" />
</sequence>
</complexType>
<complexType name="CommentType">
<simpleContent>
<extension base="string">
<!-- This allows deleted=deleted on non-empty elements, but XSD is not omnipotent -->
<attribute name="deleted" use="optional" type="mw:DeletedFlagType"/>
</extension>
</simpleContent>
</complexType>
<complexType name="TextType">
<simpleContent>
<extension base="string">
<attribute ref="xml:space" use="optional" default="preserve" />
<!-- This allows deleted=deleted on non-empty elements, but XSD is not omnipotent -->
<attribute name="deleted" use="optional" type="mw:DeletedFlagType"/>
<!-- This isn't a good idea; we should be using "ID" instead of "NMTOKEN" -->
<!-- However, "NMTOKEN" is strictest definition that is both compatible with existing -->
<!-- usage ([0-9]+) and with the "ID" type. -->
<attribute name="id" type="NMTOKEN"/>
</extension>
</simpleContent>
</complexType>
<complexType name="ContributorType">
<sequence>
<element name="username" type="string" minOccurs="0"/>
<element name="id" type="positiveInteger" minOccurs="0" />
<element name="ip" type="string" minOccurs="0"/>
</sequence>
<!-- This allows deleted=deleted on non-empty elements, but XSD is not omnipotent -->
<attribute name="deleted" use="optional" type="mw:DeletedFlagType"/>
</complexType>
<complexType name="UploadType">
<sequence>
<!-- Revision-style data... -->
<element name="timestamp" type="dateTime"/>
<element name="contributor" type="mw:ContributorType"/>
<element name="comment" type="string" minOccurs="0"/>
<!-- Filename. (Using underscores, not spaces. No 'Image:' namespace marker.) -->
<element name="filename" type="string"/>
<!-- URI at which this resource can be obtained -->
<element name="src" type="anyURI"/>
<element name="size" type="positiveInteger" />
<!-- TODO: add other metadata fields -->
</sequence>
</complexType>
<!-- Discussion threading data for LiquidThreads -->
<complexType name="DiscussionThreadingInfo">
<sequence>
<element name="ThreadSubject" type="string" />
<element name="ThreadParent" type="positiveInteger" />
<element name="ThreadAncestor" type="positiveInteger" />
<element name="ThreadPage" type="string" />
<element name="ThreadID" type="positiveInteger" />
<element name="ThreadAuthor" type="string" />
<element name="ThreadEditStatus" type="string" />
<element name="ThreadType" type="string" />
</sequence>
</complexType>
</schema>

@ -0,0 +1,19 @@
15a16,17
> Version 0.5 adds byte count per revision.
>
17c19
< http://www.mediawiki.org/xml/export-0.4.xsd
---
> http://www.mediawiki.org/xml/export-0.5.xsd
20c22
< http://www.mediawiki.org/xml/export-0.4/
---
> http://www.mediawiki.org/xml/export-0.5/
23,24c25,26
< xmlns:mw="http://www.mediawiki.org/xml/export-0.4/"
< targetNamespace="http://www.mediawiki.org/xml/export-0.4/"
---
> xmlns:mw="http://www.mediawiki.org/xml/export-0.5/"
> targetNamespace="http://www.mediawiki.org/xml/export-0.5/"
167a170
> <attribute name="bytes" use="optional" type="nonNegativeInteger"/>

@ -0,0 +1,219 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
This is an XML Schema description of the format
output by MediaWiki's Special:Export system.
Version 0.2 adds optional basic file upload info support,
which is used by our OAI export/import submodule.
Version 0.3 adds some site configuration information such
as a list of defined namespaces.
Version 0.4 adds per-revision delete flags, log exports,
discussion threading data, a per-page redirect flag, and
per-namespace capitalization.
Version 0.5 adds byte count per revision.
The canonical URL to the schema document is:
http://www.mediawiki.org/xml/export-0.5.xsd
Use the namespace:
http://www.mediawiki.org/xml/export-0.5/
-->
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:mw="http://www.mediawiki.org/xml/export-0.5/"
targetNamespace="http://www.mediawiki.org/xml/export-0.5/"
elementFormDefault="qualified">
<annotation>
<documentation xml:lang="en">
MediaWiki's page export format
</documentation>
</annotation>
<!-- Need this to reference xml:lang -->
<import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/xml.xsd"/>
<!-- Our root element -->
<element name="mediawiki" type="mw:MediaWikiType"/>
<complexType name="MediaWikiType">
<sequence>
<element name="siteinfo" type="mw:SiteInfoType"
minOccurs="0" maxOccurs="1"/>
<element name="page" type="mw:PageType"
minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="version" type="string" use="required"/>
<attribute ref="xml:lang" use="required"/>
</complexType>
<complexType name="SiteInfoType">
<sequence>
<element name="sitename" type="string" minOccurs="0" />
<element name="base" type="anyURI" minOccurs="0" />
<element name="generator" type="string" minOccurs="0" />
<element name="case" type="mw:CaseType" minOccurs="0" />
<element name="namespaces" type="mw:NamespacesType" minOccurs="0" />
</sequence>
</complexType>
<simpleType name="CaseType">
<restriction base="NMTOKEN">
<!-- Cannot have two titles differing only by case of first letter. -->
<!-- Default behavior through 1.5, $wgCapitalLinks = true -->
<enumeration value="first-letter" />
<!-- Complete title is case-sensitive -->
<!-- Behavior when $wgCapitalLinks = false -->
<enumeration value="case-sensitive" />
<!-- Cannot have non-case senstitive titles eg [[FOO]] == [[Foo]] -->
<!-- Not yet implemented as of MediaWiki 1.18 -->
<enumeration value="case-insensitive" />
</restriction>
</simpleType>
<simpleType name="DeletedFlagType">
<restriction base="NMTOKEN">
<enumeration value="deleted"/>
</restriction>
</simpleType>
<complexType name="NamespacesType">
<sequence>
<element name="namespace" type="mw:NamespaceType"
minOccurs="0" maxOccurs="unbounded" />
</sequence>
</complexType>
<complexType name="NamespaceType">
<simpleContent>
<extension base="string">
<attribute name="key" type="integer" />
<attribute name="case" type="mw:CaseType" />
</extension>
</simpleContent>
</complexType>
<complexType name="PageType">
<sequence>
<!-- Title in text form. (Using spaces, not underscores; with namespace ) -->
<element name="title" type="string"/>
<!-- optional page ID number -->
<element name="id" type="positiveInteger" minOccurs="0"/>
<!-- flag if the current revision is a redirect -->
<element name="redirect" minOccurs="0"/>
<!-- comma-separated list of string tokens, if present -->
<element name="restrictions" type="string" minOccurs="0"/>
<!-- Zero or more sets of revision or upload data -->
<choice minOccurs="0" maxOccurs="unbounded">
<element name="revision" type="mw:RevisionType" />
<element name="upload" type="mw:UploadType" />
<element name="logitem" type="mw:LogItemType" />
</choice>
<!-- Zero or One sets of discussion threading data -->
<element name="discussionthreadinginfo" minOccurs="0" maxOccurs="1" type="mw:DiscussionThreadingInfo" />
</sequence>
</complexType>
<complexType name="RevisionType">
<sequence>
<element name="id" type="positiveInteger" minOccurs="0"/>
<element name="timestamp" type="dateTime"/>
<element name="contributor" type="mw:ContributorType"/>
<element name="minor" minOccurs="0" />
<element name="comment" type="mw:CommentType" minOccurs="0"/>
<element name="text" type="mw:TextType" />
</sequence>
</complexType>
<complexType name="LogItemType">
<sequence>
<element name="id" type="positiveInteger" minOccurs="0"/>
<element name="timestamp" type="dateTime"/>
<element name="contributor" type="mw:ContributorType"/>
<element name="comment" type="mw:CommentType" minOccurs="0"/>
<element name="type" type="string" />
<element name="action" type="string" />
<element name="text" type="mw:TextType" />
</sequence>
</complexType>
<complexType name="CommentType">
<simpleContent>
<extension base="string">
<!-- This allows deleted=deleted on non-empty elements, but XSD is not omnipotent -->
<attribute name="deleted" use="optional" type="mw:DeletedFlagType"/>
</extension>
</simpleContent>
</complexType>
<complexType name="TextType">
<simpleContent>
<extension base="string">
<attribute ref="xml:space" use="optional" default="preserve" />
<!-- This allows deleted=deleted on non-empty elements, but XSD is not omnipotent -->
<attribute name="deleted" use="optional" type="mw:DeletedFlagType"/>
<!-- This isn't a good idea; we should be using "ID" instead of "NMTOKEN" -->
<!-- However, "NMTOKEN" is strictest definition that is both compatible with existing -->
<!-- usage ([0-9]+) and with the "ID" type. -->
<attribute name="id" type="NMTOKEN"/>
<attribute name="bytes" use="optional" type="nonNegativeInteger"/>
</extension>
</simpleContent>
</complexType>
<complexType name="ContributorType">
<sequence>
<element name="username" type="string" minOccurs="0"/>
<element name="id" type="positiveInteger" minOccurs="0" />
<element name="ip" type="string" minOccurs="0"/>
</sequence>
<!-- This allows deleted=deleted on non-empty elements, but XSD is not omnipotent -->
<attribute name="deleted" use="optional" type="mw:DeletedFlagType"/>
</complexType>
<complexType name="UploadType">
<sequence>
<!-- Revision-style data... -->
<element name="timestamp" type="dateTime"/>
<element name="contributor" type="mw:ContributorType"/>
<element name="comment" type="string" minOccurs="0"/>
<!-- Filename. (Using underscores, not spaces. No 'Image:' namespace marker.) -->
<element name="filename" type="string"/>
<!-- URI at which this resource can be obtained -->
<element name="src" type="anyURI"/>
<element name="size" type="positiveInteger" />
<!-- TODO: add other metadata fields -->
</sequence>
</complexType>
<!-- Discussion threading data for LiquidThreads -->
<complexType name="DiscussionThreadingInfo">
<sequence>
<element name="ThreadSubject" type="string" />
<element name="ThreadParent" type="positiveInteger" />
<element name="ThreadAncestor" type="positiveInteger" />
<element name="ThreadPage" type="string" />
<element name="ThreadID" type="positiveInteger" />
<element name="ThreadAuthor" type="string" />
<element name="ThreadEditStatus" type="string" />
<element name="ThreadType" type="string" />
</sequence>
</complexType>
</schema>

@ -0,0 +1,28 @@
17a18,20
> Version 0.6 adds a separate namespace tag, and resolves the
> redirect target and adds a separate sha1 tag for each revision.
>
19c22
< http://www.mediawiki.org/xml/export-0.5.xsd
---
> http://www.mediawiki.org/xml/export-0.6.xsd
22c25
< http://www.mediawiki.org/xml/export-0.5/
---
> http://www.mediawiki.org/xml/export-0.6/
25,26c28,29
< xmlns:mw="http://www.mediawiki.org/xml/export-0.5/"
< targetNamespace="http://www.mediawiki.org/xml/export-0.5/"
---
> xmlns:mw="http://www.mediawiki.org/xml/export-0.6/"
> targetNamespace="http://www.mediawiki.org/xml/export-0.6/"
105a109,111
> <!-- Namespace in canonical form -->
> <element name="ns" type="positiveInteger"/>
>
110c116
< <element name="redirect" minOccurs="0"/>
---
> <element name="redirect" type="string" minOccurs="0"/>
133a140
> <element name="sha1" type="string" />

@ -0,0 +1,226 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
This is an XML Schema description of the format
output by MediaWiki's Special:Export system.
Version 0.2 adds optional basic file upload info support,
which is used by our OAI export/import submodule.
Version 0.3 adds some site configuration information such
as a list of defined namespaces.
Version 0.4 adds per-revision delete flags, log exports,
discussion threading data, a per-page redirect flag, and
per-namespace capitalization.
Version 0.5 adds byte count per revision.
Version 0.6 adds a separate namespace tag, and resolves the
redirect target and adds a separate sha1 tag for each revision.
The canonical URL to the schema document is:
http://www.mediawiki.org/xml/export-0.6.xsd
Use the namespace:
http://www.mediawiki.org/xml/export-0.6/
-->
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:mw="http://www.mediawiki.org/xml/export-0.6/"
targetNamespace="http://www.mediawiki.org/xml/export-0.6/"
elementFormDefault="qualified">
<annotation>
<documentation xml:lang="en">
MediaWiki's page export format
</documentation>
</annotation>
<!-- Need this to reference xml:lang -->
<import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/xml.xsd"/>
<!-- Our root element -->
<element name="mediawiki" type="mw:MediaWikiType"/>
<complexType name="MediaWikiType">
<sequence>
<element name="siteinfo" type="mw:SiteInfoType"
minOccurs="0" maxOccurs="1"/>
<element name="page" type="mw:PageType"
minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="version" type="string" use="required"/>
<attribute ref="xml:lang" use="required"/>
</complexType>
<complexType name="SiteInfoType">
<sequence>
<element name="sitename" type="string" minOccurs="0" />
<element name="base" type="anyURI" minOccurs="0" />
<element name="generator" type="string" minOccurs="0" />
<element name="case" type="mw:CaseType" minOccurs="0" />
<element name="namespaces" type="mw:NamespacesType" minOccurs="0" />
</sequence>
</complexType>
<simpleType name="CaseType">
<restriction base="NMTOKEN">
<!-- Cannot have two titles differing only by case of first letter. -->
<!-- Default behavior through 1.5, $wgCapitalLinks = true -->
<enumeration value="first-letter" />
<!-- Complete title is case-sensitive -->
<!-- Behavior when $wgCapitalLinks = false -->
<enumeration value="case-sensitive" />
<!-- Cannot have non-case senstitive titles eg [[FOO]] == [[Foo]] -->
<!-- Not yet implemented as of MediaWiki 1.18 -->
<enumeration value="case-insensitive" />
</restriction>
</simpleType>
<simpleType name="DeletedFlagType">
<restriction base="NMTOKEN">
<enumeration value="deleted"/>
</restriction>
</simpleType>
<complexType name="NamespacesType">
<sequence>
<element name="namespace" type="mw:NamespaceType"
minOccurs="0" maxOccurs="unbounded" />
</sequence>
</complexType>
<complexType name="NamespaceType">
<simpleContent>
<extension base="string">
<attribute name="key" type="integer" />
<attribute name="case" type="mw:CaseType" />
</extension>
</simpleContent>
</complexType>
<complexType name="PageType">
<sequence>
<!-- Title in text form. (Using spaces, not underscores; with namespace ) -->
<element name="title" type="string"/>
<!-- Namespace in canonical form -->
<element name="ns" type="positiveInteger"/>
<!-- optional page ID number -->
<element name="id" type="positiveInteger" minOccurs="0"/>
<!-- flag if the current revision is a redirect -->
<element name="redirect" type="string" minOccurs="0"/>
<!-- comma-separated list of string tokens, if present -->
<element name="restrictions" type="string" minOccurs="0"/>
<!-- Zero or more sets of revision or upload data -->
<choice minOccurs="0" maxOccurs="unbounded">
<element name="revision" type="mw:RevisionType" />
<element name="upload" type="mw:UploadType" />
<element name="logitem" type="mw:LogItemType" />
</choice>
<!-- Zero or One sets of discussion threading data -->
<element name="discussionthreadinginfo" minOccurs="0" maxOccurs="1" type="mw:DiscussionThreadingInfo" />
</sequence>
</complexType>
<complexType name="RevisionType">
<sequence>
<element name="id" type="positiveInteger" minOccurs="0"/>
<element name="timestamp" type="dateTime"/>
<element name="contributor" type="mw:ContributorType"/>
<element name="minor" minOccurs="0" />
<element name="comment" type="mw:CommentType" minOccurs="0"/>
<element name="sha1" type="string" />
<element name="text" type="mw:TextType" />
</sequence>
</complexType>
<complexType name="LogItemType">
<sequence>
<element name="id" type="positiveInteger" minOccurs="0"/>
<element name="timestamp" type="dateTime"/>
<element name="contributor" type="mw:ContributorType"/>
<element name="comment" type="mw:CommentType" minOccurs="0"/>
<element name="type" type="string" />
<element name="action" type="string" />
<element name="text" type="mw:TextType" />
</sequence>
</complexType>
<complexType name="CommentType">
<simpleContent>
<extension base="string">
<!-- This allows deleted=deleted on non-empty elements, but XSD is not omnipotent -->
<attribute name="deleted" use="optional" type="mw:DeletedFlagType"/>
</extension>
</simpleContent>
</complexType>
<complexType name="TextType">
<simpleContent>
<extension base="string">
<attribute ref="xml:space" use="optional" default="preserve" />
<!-- This allows deleted=deleted on non-empty elements, but XSD is not omnipotent -->
<attribute name="deleted" use="optional" type="mw:DeletedFlagType"/>
<!-- This isn't a good idea; we should be using "ID" instead of "NMTOKEN" -->
<!-- However, "NMTOKEN" is strictest definition that is both compatible with existing -->
<!-- usage ([0-9]+) and with the "ID" type. -->
<attribute name="id" type="NMTOKEN"/>
<attribute name="bytes" use="optional" type="nonNegativeInteger"/>
</extension>
</simpleContent>
</complexType>
<complexType name="ContributorType">
<sequence>
<element name="username" type="string" minOccurs="0"/>
<element name="id" type="positiveInteger" minOccurs="0" />
<element name="ip" type="string" minOccurs="0"/>
</sequence>
<!-- This allows deleted=deleted on non-empty elements, but XSD is not omnipotent -->
<attribute name="deleted" use="optional" type="mw:DeletedFlagType"/>
</complexType>
<complexType name="UploadType">
<sequence>
<!-- Revision-style data... -->
<element name="timestamp" type="dateTime"/>
<element name="contributor" type="mw:ContributorType"/>
<element name="comment" type="string" minOccurs="0"/>
<!-- Filename. (Using underscores, not spaces. No 'Image:' namespace marker.) -->
<element name="filename" type="string"/>
<!-- URI at which this resource can be obtained -->
<element name="src" type="anyURI"/>
<element name="size" type="positiveInteger" />
<!-- TODO: add other metadata fields -->
</sequence>
</complexType>
<!-- Discussion threading data for LiquidThreads -->
<complexType name="DiscussionThreadingInfo">
<sequence>
<element name="ThreadSubject" type="string" />
<element name="ThreadParent" type="positiveInteger" />
<element name="ThreadAncestor" type="positiveInteger" />
<element name="ThreadPage" type="string" />
<element name="ThreadID" type="positiveInteger" />
<element name="ThreadAuthor" type="string" />
<element name="ThreadEditStatus" type="string" />
<element name="ThreadType" type="string" />
</sequence>
</complexType>
</schema>

@ -0,0 +1,186 @@
20a21,27
> Version 0.7 adds a unique identity constraint for both page and
> revision identifiers. See also bug 4220.
> Fix type for <ns> from "positiveInteger" to "nonNegativeInteger" to allow 0
> Moves <logitem> to its right location.
> Add parentid to revision.
> Fix type for <id> within <contributor> to "nonNegativeInteger"
>
22c29
< http://www.mediawiki.org/xml/export-0.6.xsd
---
> http://www.mediawiki.org/xml/export-0.7.xsd
25c32
< http://www.mediawiki.org/xml/export-0.6/
---
> http://www.mediawiki.org/xml/export-0.7/
28,29c35,36
< xmlns:mw="http://www.mediawiki.org/xml/export-0.6/"
< targetNamespace="http://www.mediawiki.org/xml/export-0.6/"
---
> xmlns:mw="http://www.mediawiki.org/xml/export-0.7/"
> targetNamespace="http://www.mediawiki.org/xml/export-0.7/"
40c47
< schemaLocation="http://www.w3.org/2001/xml.xsd"/>
---
> schemaLocation="http://www.w3.org/2001/xml.xsd" />
43c50,61
< <element name="mediawiki" type="mw:MediaWikiType"/>
---
> <element name="mediawiki" type="mw:MediaWikiType">
> <!-- Page ID contraint, see bug 4220 -->
> <unique name="PageIDConstraint">
> <selector xpath="mw:page" />
> <field xpath="mw:id" />
> </unique>
> <!-- Revision ID contraint, see bug 4220 -->
> <unique name="RevIDConstraint">
> <selector xpath="mw:page/mw:revision" />
> <field xpath="mw:id" />
> </unique>
> </element>
48c66
< minOccurs="0" maxOccurs="1"/>
---
> minOccurs="0" maxOccurs="1" />
50c68,70
< minOccurs="0" maxOccurs="unbounded"/>
---
> minOccurs="0" maxOccurs="unbounded" />
> <element name="logitem" type="mw:LogItemType"
> minOccurs="0" maxOccurs="unbounded" />
52,53c72,73
< <attribute name="version" type="string" use="required"/>
< <attribute ref="xml:lang" use="required"/>
---
> <attribute name="version" type="string" use="required" />
> <attribute ref="xml:lang" use="required" />
84c104
< <enumeration value="deleted"/>
---
> <enumeration value="deleted" />
103a124,131
> <complexType name="RedirectType">
> <simpleContent>
> <extension base="string">
> <attribute name="title" type="string" />
> </extension>
> </simpleContent>
> </complexType>
>
107c135
< <element name="title" type="string"/>
---
> <element name="title" type="string" />
110c138
< <element name="ns" type="positiveInteger"/>
---
> <element name="ns" type="nonNegativeInteger" />
113c141
< <element name="id" type="positiveInteger" minOccurs="0"/>
---
> <element name="id" type="positiveInteger" />
116c144
< <element name="redirect" type="string" minOccurs="0"/>
---
> <element name="redirect" type="mw:RedirectType" minOccurs="0" maxOccurs="1" />
119c147
< <element name="restrictions" type="string" minOccurs="0"/>
---
> <element name="restrictions" type="string" minOccurs="0" />
125d152
< <element name="logitem" type="mw:LogItemType" />
135,139c162,167
< <element name="id" type="positiveInteger" minOccurs="0"/>
< <element name="timestamp" type="dateTime"/>
< <element name="contributor" type="mw:ContributorType"/>
< <element name="minor" minOccurs="0" />
< <element name="comment" type="mw:CommentType" minOccurs="0"/>
---
> <element name="id" type="positiveInteger" />
> <element name="parentid" type="positiveInteger" minOccurs="0" />
> <element name="timestamp" type="dateTime" />
> <element name="contributor" type="mw:ContributorType" />
> <element name="minor" minOccurs="0" maxOccurs="1" />
> <element name="comment" type="mw:CommentType" minOccurs="0" maxOccurs="1" />
147,150c175,178
< <element name="id" type="positiveInteger" minOccurs="0"/>
< <element name="timestamp" type="dateTime"/>
< <element name="contributor" type="mw:ContributorType"/>
< <element name="comment" type="mw:CommentType" minOccurs="0"/>
---
> <element name="id" type="positiveInteger" />
> <element name="timestamp" type="dateTime" />
> <element name="contributor" type="mw:ContributorType" />
> <element name="comment" type="mw:CommentType" minOccurs="0" />
153c181,183
< <element name="text" type="mw:TextType" />
---
> <element name="text" type="mw:LogTextType" minOccurs="0" maxOccurs="1" />
> <element name="logtitle" type="string" minOccurs="0" maxOccurs="1" />
> <element name="params" type="mw:LogParamsType" minOccurs="0" maxOccurs="1" />
161c191
< <attribute name="deleted" use="optional" type="mw:DeletedFlagType"/>
---
> <attribute name="deleted" use="optional" type="mw:DeletedFlagType" />
166d195
<
172c201
< <attribute name="deleted" use="optional" type="mw:DeletedFlagType"/>
---
> <attribute name="deleted" use="optional" type="mw:DeletedFlagType" />
176,177c205,223
< <attribute name="id" type="NMTOKEN"/>
< <attribute name="bytes" use="optional" type="nonNegativeInteger"/>
---
> <attribute name="id" type="NMTOKEN" />
> <attribute name="bytes" use="optional" type="nonNegativeInteger" />
> </extension>
> </simpleContent>
> </complexType>
>
> <complexType name="LogTextType">
> <simpleContent>
> <extension base="string">
> <!-- This allows deleted=deleted on non-empty elements, but XSD is not omnipotent -->
> <attribute name="deleted" use="optional" type="mw:DeletedFlagType" />
> </extension>
> </simpleContent>
> </complexType>
>
> <complexType name="LogParamsType">
> <simpleContent>
> <extension base="string">
> <attribute ref="xml:space" use="optional" default="preserve" />
184,185c230,231
< <element name="username" type="string" minOccurs="0"/>
< <element name="id" type="positiveInteger" minOccurs="0" />
---
> <element name="username" type="string" minOccurs="0" />
> <element name="id" type="nonNegativeInteger" minOccurs="0" />
187c233
< <element name="ip" type="string" minOccurs="0"/>
---
> <element name="ip" type="string" minOccurs="0" />
190c236
< <attribute name="deleted" use="optional" type="mw:DeletedFlagType"/>
---
> <attribute name="deleted" use="optional" type="mw:DeletedFlagType" />
196,198c242,244
< <element name="timestamp" type="dateTime"/>
< <element name="contributor" type="mw:ContributorType"/>
< <element name="comment" type="string" minOccurs="0"/>
---
> <element name="timestamp" type="dateTime" />
> <element name="contributor" type="mw:ContributorType" />
> <element name="comment" type="string" minOccurs="0" />
200,201c246,247
< <!-- Filename. (Using underscores, not spaces. No 'Image:' namespace marker.) -->
< <element name="filename" type="string"/>
---
> <!-- Filename. (Using underscores, not spaces. No 'File:' namespace marker.) -->
> <element name="filename" type="string" />
204c250
< <element name="src" type="anyURI"/>
---
> <element name="src" type="anyURI" />

@ -0,0 +1,272 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
This is an XML Schema description of the format
output by MediaWiki's Special:Export system.
Version 0.2 adds optional basic file upload info support,
which is used by our OAI export/import submodule.
Version 0.3 adds some site configuration information such
as a list of defined namespaces.
Version 0.4 adds per-revision delete flags, log exports,
discussion threading data, a per-page redirect flag, and
per-namespace capitalization.
Version 0.5 adds byte count per revision.
Version 0.6 adds a separate namespace tag, and resolves the
redirect target and adds a separate sha1 tag for each revision.
Version 0.7 adds a unique identity constraint for both page and
revision identifiers. See also bug 4220.
Fix type for <ns> from "positiveInteger" to "nonNegativeInteger" to allow 0
Moves <logitem> to its right location.
Add parentid to revision.
Fix type for <id> within <contributor> to "nonNegativeInteger"
The canonical URL to the schema document is:
http://www.mediawiki.org/xml/export-0.7.xsd
Use the namespace:
http://www.mediawiki.org/xml/export-0.7/
-->
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:mw="http://www.mediawiki.org/xml/export-0.7/"
targetNamespace="http://www.mediawiki.org/xml/export-0.7/"
elementFormDefault="qualified">
<annotation>
<documentation xml:lang="en">
MediaWiki's page export format
</documentation>
</annotation>
<!-- Need this to reference xml:lang -->
<import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/xml.xsd" />
<!-- Our root element -->
<element name="mediawiki" type="mw:MediaWikiType">
<!-- Page ID contraint, see bug 4220 -->
<unique name="PageIDConstraint">
<selector xpath="mw:page" />
<field xpath="mw:id" />
</unique>
<!-- Revision ID contraint, see bug 4220 -->
<unique name="RevIDConstraint">
<selector xpath="mw:page/mw:revision" />
<field xpath="mw:id" />
</unique>
</element>
<complexType name="MediaWikiType">
<sequence>
<element name="siteinfo" type="mw:SiteInfoType"
minOccurs="0" maxOccurs="1" />
<element name="page" type="mw:PageType"
minOccurs="0" maxOccurs="unbounded" />
<element name="logitem" type="mw:LogItemType"
minOccurs="0" maxOccurs="unbounded" />
</sequence>
<attribute name="version" type="string" use="required" />
<attribute ref="xml:lang" use="required" />
</complexType>
<complexType name="SiteInfoType">
<sequence>
<element name="sitename" type="string" minOccurs="0" />
<element name="base" type="anyURI" minOccurs="0" />
<element name="generator" type="string" minOccurs="0" />
<element name="case" type="mw:CaseType" minOccurs="0" />
<element name="namespaces" type="mw:NamespacesType" minOccurs="0" />
</sequence>
</complexType>
<simpleType name="CaseType">
<restriction base="NMTOKEN">
<!-- Cannot have two titles differing only by case of first letter. -->
<!-- Default behavior through 1.5, $wgCapitalLinks = true -->
<enumeration value="first-letter" />
<!-- Complete title is case-sensitive -->
<!-- Behavior when $wgCapitalLinks = false -->
<enumeration value="case-sensitive" />
<!-- Cannot have non-case senstitive titles eg [[FOO]] == [[Foo]] -->
<!-- Not yet implemented as of MediaWiki 1.18 -->
<enumeration value="case-insensitive" />
</restriction>
</simpleType>
<simpleType name="DeletedFlagType">
<restriction base="NMTOKEN">
<enumeration value="deleted" />
</restriction>
</simpleType>
<complexType name="NamespacesType">
<sequence>
<element name="namespace" type="mw:NamespaceType"
minOccurs="0" maxOccurs="unbounded" />
</sequence>
</complexType>
<complexType name="NamespaceType">
<simpleContent>
<extension base="string">
<attribute name="key" type="integer" />
<attribute name="case" type="mw:CaseType" />
</extension>
</simpleContent>
</complexType>
<complexType name="RedirectType">
<simpleContent>
<extension base="string">
<attribute name="title" type="string" />
</extension>
</simpleContent>
</complexType>
<complexType name="PageType">
<sequence>
<!-- Title in text form. (Using spaces, not underscores; with namespace ) -->
<element name="title" type="string" />
<!-- Namespace in canonical form -->
<element name="ns" type="nonNegativeInteger" />
<!-- optional page ID number -->
<element name="id" type="positiveInteger" />
<!-- flag if the current revision is a redirect -->
<element name="redirect" type="mw:RedirectType" minOccurs="0" maxOccurs="1" />
<!-- comma-separated list of string tokens, if present -->
<element name="restrictions" type="string" minOccurs="0" />
<!-- Zero or more sets of revision or upload data -->
<choice minOccurs="0" maxOccurs="unbounded">
<element name="revision" type="mw:RevisionType" />
<element name="upload" type="mw:UploadType" />
</choice>
<!-- Zero or One sets of discussion threading data -->
<element name="discussionthreadinginfo" minOccurs="0" maxOccurs="1" type="mw:DiscussionThreadingInfo" />
</sequence>
</complexType>
<complexType name="RevisionType">
<sequence>
<element name="id" type="positiveInteger" />
<element name="parentid" type="positiveInteger" minOccurs="0" />
<element name="timestamp" type="dateTime" />
<element name="contributor" type="mw:ContributorType" />
<element name="minor" minOccurs="0" maxOccurs="1" />
<element name="comment" type="mw:CommentType" minOccurs="0" maxOccurs="1" />
<element name="sha1" type="string" />
<element name="text" type="mw:TextType" />
</sequence>
</complexType>
<complexType name="LogItemType">
<sequence>
<element name="id" type="positiveInteger" />
<element name="timestamp" type="dateTime" />
<element name="contributor" type="mw:ContributorType" />
<element name="comment" type="mw:CommentType" minOccurs="0" />
<element name="type" type="string" />
<element name="action" type="string" />
<element name="text" type="mw:LogTextType" minOccurs="0" maxOccurs="1" />
<element name="logtitle" type="string" minOccurs="0" maxOccurs="1" />
<element name="params" type="mw:LogParamsType" minOccurs="0" maxOccurs="1" />
</sequence>
</complexType>
<complexType name="CommentType">
<simpleContent>
<extension base="string">
<!-- This allows deleted=deleted on non-empty elements, but XSD is not omnipotent -->
<attribute name="deleted" use="optional" type="mw:DeletedFlagType" />
</extension>
</simpleContent>
</complexType>
<complexType name="TextType">
<simpleContent>
<extension base="string">
<attribute ref="xml:space" use="optional" default="preserve" />
<!-- This allows deleted=deleted on non-empty elements, but XSD is not omnipotent -->
<attribute name="deleted" use="optional" type="mw:DeletedFlagType" />
<!-- This isn't a good idea; we should be using "ID" instead of "NMTOKEN" -->
<!-- However, "NMTOKEN" is strictest definition that is both compatible with existing -->
<!-- usage ([0-9]+) and with the "ID" type. -->
<attribute name="id" type="NMTOKEN" />
<attribute name="bytes" use="optional" type="nonNegativeInteger" />
</extension>
</simpleContent>
</complexType>
<complexType name="LogTextType">
<simpleContent>
<extension base="string">
<!-- This allows deleted=deleted on non-empty elements, but XSD is not omnipotent -->
<attribute name="deleted" use="optional" type="mw:DeletedFlagType" />
</extension>
</simpleContent>
</complexType>
<complexType name="LogParamsType">
<simpleContent>
<extension base="string">
<attribute ref="xml:space" use="optional" default="preserve" />
</extension>
</simpleContent>
</complexType>
<complexType name="ContributorType">
<sequence>
<element name="username" type="string" minOccurs="0" />
<element name="id" type="nonNegativeInteger" minOccurs="0" />
<element name="ip" type="string" minOccurs="0" />
</sequence>
<!-- This allows deleted=deleted on non-empty elements, but XSD is not omnipotent -->
<attribute name="deleted" use="optional" type="mw:DeletedFlagType" />
</complexType>
<complexType name="UploadType">
<sequence>
<!-- Revision-style data... -->
<element name="timestamp" type="dateTime" />
<element name="contributor" type="mw:ContributorType" />
<element name="comment" type="string" minOccurs="0" />
<!-- Filename. (Using underscores, not spaces. No 'File:' namespace marker.) -->
<element name="filename" type="string" />
<!-- URI at which this resource can be obtained -->
<element name="src" type="anyURI" />
<element name="size" type="positiveInteger" />
<!-- TODO: add other metadata fields -->
</sequence>
</complexType>
<!-- Discussion threading data for LiquidThreads -->
<complexType name="DiscussionThreadingInfo">
<sequence>
<element name="ThreadSubject" type="string" />
<element name="ThreadParent" type="positiveInteger" />
<element name="ThreadAncestor" type="positiveInteger" />
<element name="ThreadPage" type="string" />
<element name="ThreadID" type="positiveInteger" />
<element name="ThreadAuthor" type="string" />
<element name="ThreadEditStatus" type="string" />
<element name="ThreadType" type="string" />
</sequence>
</complexType>
</schema>

@ -0,0 +1,37 @@
27a28,30
> Version 0.8 adds support for a <model> and a <format> tag for
> each revision. See contenthandler.txt.
>
29c32
< http://www.mediawiki.org/xml/export-0.7.xsd
---
> http://www.mediawiki.org/xml/export-0.8.xsd
32c35
< http://www.mediawiki.org/xml/export-0.7/
---
> http://www.mediawiki.org/xml/export-0.8/
35,36c38,39
< xmlns:mw="http://www.mediawiki.org/xml/export-0.7/"
< targetNamespace="http://www.mediawiki.org/xml/export-0.7/"
---
> xmlns:mw="http://www.mediawiki.org/xml/export-0.8/"
> targetNamespace="http://www.mediawiki.org/xml/export-0.8/"
131a135,146
> <simpleType name="ContentModelType">
> <restriction base="string">
> <pattern value="[a-zA-Z][-+./a-zA-Z0-9]*" />
> </restriction>
> </simpleType>
>
> <simpleType name="ContentFormatType">
> <restriction base="string">
> <pattern value="[a-zA-Z][-+.a-zA-Z0-9]*/[a-zA-Z][-+.a-zA-Z0-9]*" />
> </restriction>
> </simpleType>
>
168d182
< <element name="sha1" type="string" />
169a184,186
> <element name="sha1" type="string" />
> <element name="model" type="mw:ContentModelType" />
> <element name="format" type="mw:ContentFormatType" />

@ -0,0 +1,289 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
This is an XML Schema description of the format
output by MediaWiki's Special:Export system.
Version 0.2 adds optional basic file upload info support,
which is used by our OAI export/import submodule.
Version 0.3 adds some site configuration information such
as a list of defined namespaces.
Version 0.4 adds per-revision delete flags, log exports,
discussion threading data, a per-page redirect flag, and
per-namespace capitalization.
Version 0.5 adds byte count per revision.
Version 0.6 adds a separate namespace tag, and resolves the
redirect target and adds a separate sha1 tag for each revision.
Version 0.7 adds a unique identity constraint for both page and
revision identifiers. See also bug 4220.
Fix type for <ns> from "positiveInteger" to "nonNegativeInteger" to allow 0
Moves <logitem> to its right location.
Add parentid to revision.
Fix type for <id> within <contributor> to "nonNegativeInteger"
Version 0.8 adds support for a <model> and a <format> tag for
each revision. See contenthandler.txt.
The canonical URL to the schema document is:
http://www.mediawiki.org/xml/export-0.8.xsd
Use the namespace:
http://www.mediawiki.org/xml/export-0.8/
-->
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:mw="http://www.mediawiki.org/xml/export-0.8/"
targetNamespace="http://www.mediawiki.org/xml/export-0.8/"
elementFormDefault="qualified">
<annotation>
<documentation xml:lang="en">
MediaWiki's page export format
</documentation>
</annotation>
<!-- Need this to reference xml:lang -->
<import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/xml.xsd" />
<!-- Our root element -->
<element name="mediawiki" type="mw:MediaWikiType">
<!-- Page ID contraint, see bug 4220 -->
<unique name="PageIDConstraint">
<selector xpath="mw:page" />
<field xpath="mw:id" />
</unique>
<!-- Revision ID contraint, see bug 4220 -->
<unique name="RevIDConstraint">
<selector xpath="mw:page/mw:revision" />
<field xpath="mw:id" />
</unique>
</element>
<complexType name="MediaWikiType">
<sequence>
<element name="siteinfo" type="mw:SiteInfoType"
minOccurs="0" maxOccurs="1" />
<element name="page" type="mw:PageType"
minOccurs="0" maxOccurs="unbounded" />
<element name="logitem" type="mw:LogItemType"
minOccurs="0" maxOccurs="unbounded" />
</sequence>
<attribute name="version" type="string" use="required" />
<attribute ref="xml:lang" use="required" />
</complexType>
<complexType name="SiteInfoType">
<sequence>
<element name="sitename" type="string" minOccurs="0" />
<element name="base" type="anyURI" minOccurs="0" />
<element name="generator" type="string" minOccurs="0" />
<element name="case" type="mw:CaseType" minOccurs="0" />
<element name="namespaces" type="mw:NamespacesType" minOccurs="0" />
</sequence>
</complexType>
<simpleType name="CaseType">
<restriction base="NMTOKEN">
<!-- Cannot have two titles differing only by case of first letter. -->
<!-- Default behavior through 1.5, $wgCapitalLinks = true -->
<enumeration value="first-letter" />
<!-- Complete title is case-sensitive -->
<!-- Behavior when $wgCapitalLinks = false -->
<enumeration value="case-sensitive" />
<!-- Cannot have non-case senstitive titles eg [[FOO]] == [[Foo]] -->
<!-- Not yet implemented as of MediaWiki 1.18 -->
<enumeration value="case-insensitive" />
</restriction>
</simpleType>
<simpleType name="DeletedFlagType">
<restriction base="NMTOKEN">
<enumeration value="deleted" />
</restriction>
</simpleType>
<complexType name="NamespacesType">
<sequence>
<element name="namespace" type="mw:NamespaceType"
minOccurs="0" maxOccurs="unbounded" />
</sequence>
</complexType>
<complexType name="NamespaceType">
<simpleContent>
<extension base="string">
<attribute name="key" type="integer" />
<attribute name="case" type="mw:CaseType" />
</extension>
</simpleContent>
</complexType>
<complexType name="RedirectType">
<simpleContent>
<extension base="string">
<attribute name="title" type="string" />
</extension>
</simpleContent>
</complexType>
<simpleType name="ContentModelType">
<restriction base="string">
<pattern value="[a-zA-Z][-+./a-zA-Z0-9]*" />
</restriction>
</simpleType>
<simpleType name="ContentFormatType">
<restriction base="string">
<pattern value="[a-zA-Z][-+.a-zA-Z0-9]*/[a-zA-Z][-+.a-zA-Z0-9]*" />
</restriction>
</simpleType>
<complexType name="PageType">
<sequence>
<!-- Title in text form. (Using spaces, not underscores; with namespace ) -->
<element name="title" type="string" />
<!-- Namespace in canonical form -->
<element name="ns" type="nonNegativeInteger" />
<!-- optional page ID number -->
<element name="id" type="positiveInteger" />
<!-- flag if the current revision is a redirect -->
<element name="redirect" type="mw:RedirectType" minOccurs="0" maxOccurs="1" />
<!-- comma-separated list of string tokens, if present -->
<element name="restrictions" type="string" minOccurs="0" />
<!-- Zero or more sets of revision or upload data -->
<choice minOccurs="0" maxOccurs="unbounded">
<element name="revision" type="mw:RevisionType" />
<element name="upload" type="mw:UploadType" />
</choice>
<!-- Zero or One sets of discussion threading data -->
<element name="discussionthreadinginfo" minOccurs="0" maxOccurs="1" type="mw:DiscussionThreadingInfo" />
</sequence>
</complexType>
<complexType name="RevisionType">
<sequence>
<element name="id" type="positiveInteger" />
<element name="parentid" type="positiveInteger" minOccurs="0" />
<element name="timestamp" type="dateTime" />
<element name="contributor" type="mw:ContributorType" />
<element name="minor" minOccurs="0" maxOccurs="1" />
<element name="comment" type="mw:CommentType" minOccurs="0" maxOccurs="1" />
<element name="text" type="mw:TextType" />
<element name="sha1" type="string" />
<element name="model" type="mw:ContentModelType" />
<element name="format" type="mw:ContentFormatType" />
</sequence>
</complexType>
<complexType name="LogItemType">
<sequence>
<element name="id" type="positiveInteger" />
<element name="timestamp" type="dateTime" />
<element name="contributor" type="mw:ContributorType" />
<element name="comment" type="mw:CommentType" minOccurs="0" />
<element name="type" type="string" />
<element name="action" type="string" />
<element name="text" type="mw:LogTextType" minOccurs="0" maxOccurs="1" />
<element name="logtitle" type="string" minOccurs="0" maxOccurs="1" />
<element name="params" type="mw:LogParamsType" minOccurs="0" maxOccurs="1" />
</sequence>
</complexType>
<complexType name="CommentType">
<simpleContent>
<extension base="string">
<!-- This allows deleted=deleted on non-empty elements, but XSD is not omnipotent -->
<attribute name="deleted" use="optional" type="mw:DeletedFlagType" />
</extension>
</simpleContent>
</complexType>
<complexType name="TextType">
<simpleContent>
<extension base="string">
<attribute ref="xml:space" use="optional" default="preserve" />
<!-- This allows deleted=deleted on non-empty elements, but XSD is not omnipotent -->
<attribute name="deleted" use="optional" type="mw:DeletedFlagType" />
<!-- This isn't a good idea; we should be using "ID" instead of "NMTOKEN" -->
<!-- However, "NMTOKEN" is strictest definition that is both compatible with existing -->
<!-- usage ([0-9]+) and with the "ID" type. -->
<attribute name="id" type="NMTOKEN" />
<attribute name="bytes" use="optional" type="nonNegativeInteger" />
</extension>
</simpleContent>
</complexType>
<complexType name="LogTextType">
<simpleContent>
<extension base="string">
<!-- This allows deleted=deleted on non-empty elements, but XSD is not omnipotent -->
<attribute name="deleted" use="optional" type="mw:DeletedFlagType" />
</extension>
</simpleContent>
</complexType>
<complexType name="LogParamsType">
<simpleContent>
<extension base="string">
<attribute ref="xml:space" use="optional" default="preserve" />
</extension>
</simpleContent>
</complexType>
<complexType name="ContributorType">
<sequence>
<element name="username" type="string" minOccurs="0" />
<element name="id" type="nonNegativeInteger" minOccurs="0" />
<element name="ip" type="string" minOccurs="0" />
</sequence>
<!-- This allows deleted=deleted on non-empty elements, but XSD is not omnipotent -->
<attribute name="deleted" use="optional" type="mw:DeletedFlagType" />
</complexType>
<complexType name="UploadType">
<sequence>
<!-- Revision-style data... -->
<element name="timestamp" type="dateTime" />
<element name="contributor" type="mw:ContributorType" />
<element name="comment" type="string" minOccurs="0" />
<!-- Filename. (Using underscores, not spaces. No 'File:' namespace marker.) -->
<element name="filename" type="string" />
<!-- URI at which this resource can be obtained -->
<element name="src" type="anyURI" />
<element name="size" type="positiveInteger" />
<!-- TODO: add other metadata fields -->
</sequence>
</complexType>
<!-- Discussion threading data for LiquidThreads -->
<complexType name="DiscussionThreadingInfo">
<sequence>
<element name="ThreadSubject" type="string" />
<element name="ThreadParent" type="positiveInteger" />
<element name="ThreadAncestor" type="positiveInteger" />
<element name="ThreadPage" type="string" />
<element name="ThreadID" type="positiveInteger" />
<element name="ThreadAuthor" type="string" />
<element name="ThreadEditStatus" type="string" />
<element name="ThreadType" type="string" />
</sequence>
</complexType>
</schema>
Loading…
Cancel
Save