Index: trunk/phase3/docs/export-0.6.xsd |
— | — | @@ -1,225 +0,0 @@ |
2 | | -<?xml version="1.0" encoding="UTF-8" ?> |
3 | | -<!-- |
4 | | - This is an XML Schema description of the format |
5 | | - output by MediaWiki's Special:Export system. |
6 | | - |
7 | | - Version 0.2 adds optional basic file upload info support, |
8 | | - which is used by our OAI export/import submodule. |
9 | | - |
10 | | - Version 0.3 adds some site configuration information such |
11 | | - as a list of defined namespaces. |
12 | | - |
13 | | - Version 0.4 adds per-revision delete flags, log exports, |
14 | | - discussion threading data, a per-page redirect flag, and |
15 | | - per-namespace capitalization. |
16 | | - |
17 | | - Version 0.5 adds byte count per revision. |
18 | | - |
19 | | - Version 0.6 adds a separate namespace tag, locates the |
20 | | - redirect target and strips of the namespace from the title. |
21 | | - |
22 | | - The canonical URL to the schema document is: |
23 | | - http://www.mediawiki.org/xml/export-0.6.xsd |
24 | | - |
25 | | - Use the namespace: |
26 | | - http://www.mediawiki.org/xml/export-0.6/ |
27 | | -<schema xmlns="http://www.w3.org/2001/XMLSchema" |
28 | | - xmlns:mw="http://www.mediawiki.org/xml/export-0.6/" |
29 | | - targetNamespace="http://www.mediawiki.org/xml/export-0.6/" |
30 | | - elementFormDefault="qualified"> |
31 | | - |
32 | | - <annotation> |
33 | | - <documentation xml:lang="en"> |
34 | | - MediaWiki's page export format |
35 | | - </documentation> |
36 | | - </annotation> |
37 | | - |
38 | | - <!-- Need this to reference xml:lang --> |
39 | | - <import namespace="http://www.w3.org/XML/1998/namespace" |
40 | | - schemaLocation="http://www.w3.org/2001/xml.xsd"/> |
41 | | - |
42 | | - <!-- Our root element --> |
43 | | - <element name="mediawiki" type="mw:MediaWikiType"/> |
44 | | - |
45 | | - <complexType name="MediaWikiType"> |
46 | | - <sequence> |
47 | | - <element name="siteinfo" type="mw:SiteInfoType" |
48 | | - minOccurs="0" maxOccurs="1"/> |
49 | | - <element name="page" type="mw:PageType" |
50 | | - minOccurs="0" maxOccurs="unbounded"/> |
51 | | - </sequence> |
52 | | - <attribute name="version" type="string" use="required"/> |
53 | | - <attribute ref="xml:lang" use="required"/> |
54 | | - </complexType> |
55 | | - |
56 | | - <complexType name="SiteInfoType"> |
57 | | - <sequence> |
58 | | - <element name="sitename" type="string" minOccurs="0" /> |
59 | | - <element name="base" type="anyURI" minOccurs="0" /> |
60 | | - <element name="generator" type="string" minOccurs="0" /> |
61 | | - <element name="case" type="mw:CaseType" minOccurs="0" /> |
62 | | - <element name="namespaces" type="mw:NamespacesType" minOccurs="0" /> |
63 | | - </sequence> |
64 | | - </complexType> |
65 | | - |
66 | | - <simpleType name="CaseType"> |
67 | | - <restriction base="NMTOKEN"> |
68 | | - <!-- Cannot have two titles differing only by case of first letter. --> |
69 | | - <!-- Default behavior through 1.5, $wgCapitalLinks = true --> |
70 | | - <enumeration value="first-letter" /> |
71 | | - |
72 | | - <!-- Complete title is case-sensitive --> |
73 | | - <!-- Behavior when $wgCapitalLinks = false --> |
74 | | - <enumeration value="case-sensitive" /> |
75 | | - |
76 | | - <!-- Cannot have non-case senstitive titles eg [[FOO]] == [[Foo]] --> |
77 | | - <!-- Not yet implemented as of MediaWiki 1.18 --> |
78 | | - <enumeration value="case-insensitive" /> |
79 | | - </restriction> |
80 | | - </simpleType> |
81 | | - |
82 | | - <simpleType name="DeletedFlagType"> |
83 | | - <restriction base="NMTOKEN"> |
84 | | - <enumeration value="deleted"/> |
85 | | - </restriction> |
86 | | - </simpleType> |
87 | | - |
88 | | - <complexType name="NamespacesType"> |
89 | | - <sequence> |
90 | | - <element name="namespace" type="mw:NamespaceType" |
91 | | - minOccurs="0" maxOccurs="unbounded" /> |
92 | | - </sequence> |
93 | | - </complexType> |
94 | | - |
95 | | - <complexType name="NamespaceType"> |
96 | | - <simpleContent> |
97 | | - <extension base="string"> |
98 | | - <attribute name="key" type="integer" /> |
99 | | - <attribute name="case" type="mw:CaseType" /> |
100 | | - </extension> |
101 | | - </simpleContent> |
102 | | - </complexType> |
103 | | - |
104 | | - <complexType name="PageType"> |
105 | | - <sequence> |
106 | | - <!-- Title in text form. (Using spaces, not underscores; with namespace ) --> |
107 | | - <element name="title" type="string"/> |
108 | | - |
109 | | - <!-- Namesapce in text form --> |
110 | | - <element name="ns" type="string"/> |
111 | | - |
112 | | - <!-- optional page ID number --> |
113 | | - <element name="id" type="positiveInteger" minOccurs="0"/> |
114 | | - |
115 | | - <!-- flag if the current revision is a redirect --> |
116 | | - <element name="redirect" type="string" minOccurs="0"/> |
117 | | - |
118 | | - <!-- comma-separated list of string tokens, if present --> |
119 | | - <element name="restrictions" type="string" minOccurs="0"/> |
120 | | - |
121 | | - <!-- Zero or more sets of revision or upload data --> |
122 | | - <choice minOccurs="0" maxOccurs="unbounded"> |
123 | | - <element name="revision" type="mw:RevisionType" /> |
124 | | - <element name="upload" type="mw:UploadType" /> |
125 | | - <element name="logitem" type="mw:LogItemType" /> |
126 | | - </choice> |
127 | | - |
128 | | - <!-- Zero or One sets of discussion threading data --> |
129 | | - <element name="discussionthreadinginfo" minOccurs="0" maxOccurs="1" type="mw:DiscussionThreadingInfo" /> |
130 | | - </sequence> |
131 | | - </complexType> |
132 | | - |
133 | | - <complexType name="RevisionType"> |
134 | | - <sequence> |
135 | | - <element name="id" type="positiveInteger" minOccurs="0"/> |
136 | | - <element name="timestamp" type="dateTime"/> |
137 | | - <element name="contributor" type="mw:ContributorType"/> |
138 | | - <element name="minor" minOccurs="0" /> |
139 | | - <element name="comment" type="mw:CommentType" minOccurs="0"/> |
140 | | - <element name="text" type="mw:TextType" /> |
141 | | - </sequence> |
142 | | - </complexType> |
143 | | - |
144 | | - <complexType name="LogItemType"> |
145 | | - <sequence> |
146 | | - <element name="id" type="positiveInteger" minOccurs="0"/> |
147 | | - <element name="timestamp" type="dateTime"/> |
148 | | - <element name="contributor" type="mw:ContributorType"/> |
149 | | - <element name="comment" type="mw:CommentType" minOccurs="0"/> |
150 | | - <element name="type" type="string" /> |
151 | | - <element name="action" type="string" /> |
152 | | - <element name="text" type="mw:TextType" /> |
153 | | - </sequence> |
154 | | - </complexType> |
155 | | - |
156 | | - <complexType name="CommentType"> |
157 | | - <simpleContent> |
158 | | - <extension base="string"> |
159 | | - <!-- This allows deleted=deleted on non-empty elements, but XSD is not omnipotent --> |
160 | | - <attribute name="deleted" use="optional" type="mw:DeletedFlagType"/> |
161 | | - </extension> |
162 | | - </simpleContent> |
163 | | - </complexType> |
164 | | - |
165 | | - |
166 | | - <complexType name="TextType"> |
167 | | - <simpleContent> |
168 | | - <extension base="string"> |
169 | | - <attribute ref="xml:space" use="optional" default="preserve" /> |
170 | | - <!-- This allows deleted=deleted on non-empty elements, but XSD is not omnipotent --> |
171 | | - <attribute name="deleted" use="optional" type="mw:DeletedFlagType"/> |
172 | | - <!-- This isn't a good idea; we should be using "ID" instead of "NMTOKEN" --> |
173 | | - <!-- However, "NMTOKEN" is strictest definition that is both compatible with existing --> |
174 | | - <!-- usage ([0-9]+) and with the "ID" type. --> |
175 | | - <attribute name="id" type="NMTOKEN"/> |
176 | | - <attribute name="bytes" use="optional" type="nonNegativeInteger"/> |
177 | | - </extension> |
178 | | - </simpleContent> |
179 | | - </complexType> |
180 | | - |
181 | | - <complexType name="ContributorType"> |
182 | | - <sequence> |
183 | | - <element name="username" type="string" minOccurs="0"/> |
184 | | - <element name="id" type="positiveInteger" minOccurs="0" /> |
185 | | - |
186 | | - <element name="ip" type="string" minOccurs="0"/> |
187 | | - </sequence> |
188 | | - <!-- This allows deleted=deleted on non-empty elements, but XSD is not omnipotent --> |
189 | | - <attribute name="deleted" use="optional" type="mw:DeletedFlagType"/> |
190 | | - </complexType> |
191 | | - |
192 | | - <complexType name="UploadType"> |
193 | | - <sequence> |
194 | | - <!-- Revision-style data... --> |
195 | | - <element name="timestamp" type="dateTime"/> |
196 | | - <element name="contributor" type="mw:ContributorType"/> |
197 | | - <element name="comment" type="string" minOccurs="0"/> |
198 | | - |
199 | | - <!-- Filename. (Using underscores, not spaces. No 'Image:' namespace marker.) --> |
200 | | - <element name="filename" type="string"/> |
201 | | - |
202 | | - <!-- URI at which this resource can be obtained --> |
203 | | - <element name="src" type="anyURI"/> |
204 | | - |
205 | | - <element name="size" type="positiveInteger" /> |
206 | | - |
207 | | - <!-- TODO: add other metadata fields --> |
208 | | - </sequence> |
209 | | - </complexType> |
210 | | - |
211 | | - <!-- Discussion threading data for LiquidThreads --> |
212 | | - <complexType name="DiscussionThreadingInfo"> |
213 | | - <sequence> |
214 | | - <element name="ThreadSubject" type="string" /> |
215 | | - <element name="ThreadParent" type="positiveInteger" /> |
216 | | - <element name="ThreadAncestor" type="positiveInteger" /> |
217 | | - <element name="ThreadPage" type="string" /> |
218 | | - <element name="ThreadID" type="positiveInteger" /> |
219 | | - <element name="ThreadAuthor" type="string" /> |
220 | | - <element name="ThreadEditStatus" type="string" /> |
221 | | - <element name="ThreadType" type="string" /> |
222 | | - </sequence> |
223 | | - </complexType> |
224 | | - |
225 | | -</schema> |