1 <?xml version=
"1.0" encoding=
"UTF-8" ?>
3 This is an XML Schema description of the format
4 output by MediaWiki's Special:Export system.
6 Version 0.2 adds optional basic file upload info support,
7 which is used by our OAI export/import submodule.
9 The canonical URL to the schema document is:
10 http://www.mediawiki.org/xml/export-0.2.xsd
13 http://www.mediawiki.org/xml/export-0.2/
15 <schema xmlns=
"http://www.w3.org/2001/XMLSchema"
16 xmlns:
mw=
"http://www.mediawiki.org/xml/export-0.2/"
17 targetNamespace=
"http://www.mediawiki.org/xml/export-0.2/"
18 elementFormDefault=
"qualified">
21 <documentation xml:
lang=
"en">
22 MediaWiki's page export format
26 <!-- Need this to reference xml:lang -->
27 <import namespace=
"http://www.w3.org/XML/1998/namespace"
28 schemaLocation=
"http://www.w3.org/2001/xml.xsd"/>
30 <!-- Our root element -->
31 <element name=
"mediawiki" type=
"mw:MediaWikiType"/>
33 <complexType name=
"MediaWikiType">
35 <element name=
"page" type=
"mw:PageType"
36 minOccurs=
"0" maxOccurs=
"unbounded"/>
38 <attribute name=
"version" type=
"string" use=
"required"/>
39 <attribute ref=
"xml:lang" use=
"required"/>
42 <complexType name=
"PageType">
44 <!-- Title in text form. (Using spaces, not underscores; with namespace ) -->
45 <element name=
"title" type=
"string"/>
47 <!-- optional page ID number -->
48 <element name=
"id" type=
"positiveInteger" minOccurs=
"0"/>
50 <!-- comma-separated list of string tokens, if present -->
51 <element name=
"restrictions" type=
"string" minOccurs=
"0"/>
53 <!-- Zero or more sets of revision or upload data -->
54 <choice minOccurs=
"0" maxOccurs=
"unbounded">
55 <element name=
"revision" type=
"mw:RevisionType" />
56 <element name=
"upload" type=
"mw:UploadType" />
61 <complexType name=
"RevisionType">
63 <element name=
"id" type=
"positiveInteger" minOccurs=
"0"/>
64 <element name=
"timestamp" type=
"dateTime"/>
65 <element name=
"contributor" type=
"mw:ContributorType"/>
66 <element name=
"minor" minOccurs=
"0" />
67 <element name=
"comment" type=
"string" minOccurs=
"0"/>
68 <element name=
"text" type=
"string"/>
72 <complexType name=
"ContributorType">
74 <element name=
"username" type=
"string" minOccurs=
"0"/>
75 <element name=
"id" type=
"positiveInteger" minOccurs=
"0" />
77 <element name=
"ip" type=
"string" minOccurs=
"0"/>
81 <complexType name=
"UploadType">
83 <!-- Revision-style data... -->
84 <element name=
"timestamp" type=
"dateTime"/>
85 <element name=
"contributor" type=
"mw:ContributorType"/>
86 <element name=
"comment" type=
"string" minOccurs=
"0"/>
88 <!-- Filename. (Using underscores, not spaces. No 'Image:' namespace marker.) -->
89 <element name=
"filename" type=
"string"/>
91 <!-- URI at which this resource can be obtained -->
92 <element name=
"src" type=
"anyURI"/>
94 <element name=
"size" type=
"positiveInteger" />
96 <!-- TODO: add other metadata fields -->