contributor <id> appears after <username> when present, not before
[lhc/web/wiklou.git] / docs / export-0.1.xsd
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3 This is an XML Schema description of the format
4 output by MediaWiki's Special:Export system.
5
6 The canonical URL to the schema document is:
7 http://www.mediawiki.org/xml/export-0.1/export-0.1.xsd
8 -->
9 <schema xmlns="http://www.w3.org/2001/XMLSchema"
10 xmlns:mw="http://www.mediawiki.org/xml/export-0.1/"
11 targetNamespace="http://www.mediawiki.org/xml/export-0.1/"
12 elementFormDefault="qualified">
13
14 <annotation>
15 <documentation xml:lang="en">
16 MediaWiki's page export format
17 </documentation>
18 </annotation>
19
20 <!-- Need this to reference xml:lang -->
21 <import namespace="http://www.w3.org/XML/1998/namespace"
22 schemaLocation="http://www.w3.org/2001/xml.xsd"/>
23
24 <!-- Our root element -->
25 <element name="mediawiki" type="mw:MediaWikiType"/>
26
27 <complexType name="MediaWikiType">
28 <sequence>
29 <element name="page" type="mw:PageType"
30 minOccurs="0" maxOccurs="unbounded"/>
31 </sequence>
32 <attribute name="version" type="string" use="required"/>
33 <attribute ref="xml:lang" use="required"/>
34 </complexType>
35
36 <complexType name="PageType">
37 <sequence>
38 <!-- Title in text form. (Using spaces, not underscores; with namespace ) -->
39 <element name="title" type="string"/>
40
41 <!-- optional page ID number -->
42 <element name="id" type="positiveInteger" minOccurs="0"/>
43
44 <!-- comma-separated list of string tokens, if present -->
45 <element name="restrictions" type="string" minOccurs="0"/>
46
47 <!-- Zero or more sets of revision data -->
48 <element name="revision" type="mw:RevisionType"
49 minOccurs="0" maxOccurs="unbounded"/>
50 </sequence>
51 </complexType>
52
53 <complexType name="RevisionType">
54 <sequence>
55 <element name="id" type="positiveInteger" minOccurs="0"/>
56 <element name="timestamp" type="dateTime"/>
57 <element name="contributor" type="mw:ContributorType"/>
58 <element name="minor" minOccurs="0" />
59 <element name="comment" type="string" minOccurs="0"/>
60 <element name="text" type="string"/>
61 </sequence>
62 </complexType>
63
64 <complexType name="ContributorType">
65 <sequence>
66 <element name="username" type="string" minOccurs="0"/>
67 <element name="id" type="positiveInteger" minOccurs="0" />
68
69 <element name="ip" type="string" minOccurs="0"/>
70 </sequence>
71 </complexType>
72
73 </schema>