summaryrefslogtreecommitdiff
path: root/docs/export-0.1.xsd
blob: 0b3eb1791439dc8d0b2879a2cb33481f6a13c397 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
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>