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 Version 0.3 adds some site configuration information such
10 as a list of defined namespaces.
12 The canonical URL to the schema document is:
13 http://www.mediawiki.org/xml/export-0.3.xsd
16 http://www.mediawiki.org/xml/export-0.3/
18 <schema xmlns=
"http://www.w3.org/2001/XMLSchema"
19 xmlns:
mw=
"http://www.mediawiki.org/xml/export-0.3/"
20 targetNamespace=
"http://www.mediawiki.org/xml/export-0.3/"
21 elementFormDefault=
"qualified">
24 <documentation xml:
lang=
"en">
25 MediaWiki's page export format
29 <!-- Need this to reference xml:lang -->
30 <import namespace=
"http://www.w3.org/XML/1998/namespace"
31 schemaLocation=
"http://www.w3.org/2001/xml.xsd"/>
33 <!-- Our root element -->
34 <element name=
"mediawiki" type=
"mw:MediaWikiType"/>
36 <complexType name=
"MediaWikiType">
38 <element name=
"siteinfo" type=
"mw:SiteInfoType"
39 minOccurs=
"0" maxOccurs=
"1"/>
40 <element name=
"page" type=
"mw:PageType"
41 minOccurs=
"0" maxOccurs=
"unbounded"/>
43 <attribute name=
"version" type=
"string" use=
"required"/>
44 <attribute ref=
"xml:lang" use=
"required"/>
47 <complexType name=
"SiteInfoType">
49 <element name=
"sitename" type=
"string" minOccurs=
"0" />
50 <element name=
"base" type=
"anyURI" minOccurs=
"0" />
51 <element name=
"generator" type=
"string" minOccurs=
"0" />
52 <element name=
"case" type=
"mw:CaseType" minOccurs=
"0" />
53 <element name=
"namespaces" type=
"mw:NamespacesType" minOccurs=
"0" />
57 <simpleType name=
"CaseType">
58 <restriction base=
"NMTOKEN">
59 <!-- Cannot have two titles differing only by case of first letter. -->
60 <!-- Default behavior through 1.5, $wgCapitalLinks = true -->
61 <enumeration value=
"first-letter" />
63 <!-- Complete title is case-sensitive -->
64 <!-- Behavior when $wgCapitalLinks = false -->
65 <enumeration value=
"case-sensitive" />
67 <!-- Cannot have two titles differing only by case. -->
68 <!-- Not yet implemented as of MediaWiki 1.5 -->
69 <enumeration value=
"case-insensitive" />
73 <complexType name=
"NamespacesType">
75 <element name=
"namespace" type=
"mw:NamespaceType"
76 minOccurs=
"0" maxOccurs=
"unbounded" />
80 <complexType name=
"NamespaceType">
82 <extension base=
"string">
83 <attribute name=
"key" type=
"integer" />
88 <complexType name=
"PageType">
90 <!-- Title in text form. (Using spaces, not underscores; with namespace ) -->
91 <element name=
"title" type=
"string"/>
93 <!-- optional page ID number -->
94 <element name=
"id" type=
"positiveInteger" minOccurs=
"0"/>
96 <!-- comma-separated list of string tokens, if present -->
97 <element name=
"restrictions" type=
"string" minOccurs=
"0"/>
99 <!-- Zero or more sets of revision or upload data -->
100 <choice minOccurs=
"0" maxOccurs=
"unbounded">
101 <element name=
"revision" type=
"mw:RevisionType" />
102 <element name=
"upload" type=
"mw:UploadType" />
107 <complexType name=
"RevisionType">
109 <element name=
"id" type=
"positiveInteger" minOccurs=
"0"/>
110 <element name=
"timestamp" type=
"dateTime"/>
111 <element name=
"contributor" type=
"mw:ContributorType"/>
112 <element name=
"minor" minOccurs=
"0" />
113 <element name=
"comment" type=
"string" minOccurs=
"0"/>
114 <element name=
"text" type=
"mw:TextType" />
118 <complexType name=
"TextType">
120 <extension base=
"string">
121 <attribute ref=
"xml:space" use=
"optional" default=
"preserve" />
126 <complexType name=
"ContributorType">
128 <element name=
"username" type=
"string" minOccurs=
"0"/>
129 <element name=
"id" type=
"positiveInteger" minOccurs=
"0" />
131 <element name=
"ip" type=
"string" minOccurs=
"0"/>
135 <complexType name=
"UploadType">
137 <!-- Revision-style data... -->
138 <element name=
"timestamp" type=
"dateTime"/>
139 <element name=
"contributor" type=
"mw:ContributorType"/>
140 <element name=
"comment" type=
"string" minOccurs=
"0"/>
142 <!-- Filename. (Using underscores, not spaces. No 'Image:' namespace marker.) -->
143 <element name=
"filename" type=
"string"/>
145 <!-- URI at which this resource can be obtained -->
146 <element name=
"src" type=
"anyURI"/>
148 <element name=
"size" type=
"positiveInteger" />
150 <!-- TODO: add other metadata fields -->