aboutsummaryrefslogtreecommitdiffstats
path: root/docs/export-0.7.xsd
diff options
context:
space:
mode:
Diffstat (limited to 'docs/export-0.7.xsd')
-rw-r--r--docs/export-0.7.xsd108
1 files changed, 39 insertions, 69 deletions
diff --git a/docs/export-0.7.xsd b/docs/export-0.7.xsd
index 5bb4417de79b..1871a65876dc 100644
--- a/docs/export-0.7.xsd
+++ b/docs/export-0.7.xsd
@@ -20,8 +20,6 @@
Version 0.7 adds a unique identity constraint for both page and
revision identifiers. See also bug 4220.
- Fix type for <ns> from "positiveInteger" to "nonNegativeInteger" to allow 0
- Moves <logitem> to its right location.
The canonical URL to the schema document is:
http://www.mediawiki.org/xml/export-0.7.xsd
@@ -42,33 +40,31 @@
<!-- Need this to reference xml:lang -->
<import namespace="http://www.w3.org/XML/1998/namespace"
- schemaLocation="http://www.w3.org/2001/xml.xsd" />
+ schemaLocation="http://www.w3.org/2001/xml.xsd"/>
<!-- Our root element -->
<element name="mediawiki" type="mw:MediaWikiType">
<!-- Page ID contraint, see bug 4220 -->
<unique name="PageIDConstraint">
- <selector xpath="mw:page" />
- <field xpath="mw:id" />
+ <selector xpath="mw:page"/>
+ <field xpath="mw:id"/>
</unique>
<!-- Revision ID contraint, see bug 4220 -->
<unique name="RevIDConstraint">
- <selector xpath="mw:page/mw:revision" />
- <field xpath="mw:id" />
+ <selector xpath="mw:page/mw:revision"/>
+ <field xpath="mw:id"/>
</unique>
</element>
<complexType name="MediaWikiType">
<sequence>
<element name="siteinfo" type="mw:SiteInfoType"
- minOccurs="0" maxOccurs="1" />
+ minOccurs="0" maxOccurs="1"/>
<element name="page" type="mw:PageType"
- minOccurs="0" maxOccurs="unbounded" />
- <element name="logitem" type="mw:LogItemType"
- minOccurs="0" maxOccurs="unbounded" />
+ minOccurs="0" maxOccurs="unbounded"/>
</sequence>
- <attribute name="version" type="string" use="required" />
- <attribute ref="xml:lang" use="required" />
+ <attribute name="version" type="string" use="required"/>
+ <attribute ref="xml:lang" use="required"/>
</complexType>
<complexType name="SiteInfoType">
@@ -99,7 +95,7 @@
<simpleType name="DeletedFlagType">
<restriction base="NMTOKEN">
- <enumeration value="deleted" />
+ <enumeration value="deleted"/>
</restriction>
</simpleType>
@@ -119,35 +115,28 @@
</simpleContent>
</complexType>
- <complexType name="RedirectType">
- <simpleContent>
- <extension base="string">
- <attribute name="title" type="string" />
- </extension>
- </simpleContent>
- </complexType>
-
<complexType name="PageType">
<sequence>
<!-- Title in text form. (Using spaces, not underscores; with namespace ) -->
- <element name="title" type="string" />
+ <element name="title" type="string"/>
<!-- Namespace in canonical form -->
- <element name="ns" type="nonNegativeInteger" />
+ <element name="ns" type="positiveInteger"/>
<!-- optional page ID number -->
- <element name="id" type="positiveInteger" />
+ <element name="id" type="positiveInteger" minOccurs="0"/>
<!-- flag if the current revision is a redirect -->
- <element name="redirect" type="mw:RedirectType" minOccurs="0" maxOccurs="1" />
+ <element name="redirect" type="string" minOccurs="0"/>
<!-- comma-separated list of string tokens, if present -->
- <element name="restrictions" type="string" minOccurs="0" />
+ <element name="restrictions" type="string" minOccurs="0"/>
<!-- Zero or more sets of revision or upload data -->
<choice minOccurs="0" maxOccurs="unbounded">
<element name="revision" type="mw:RevisionType" />
<element name="upload" type="mw:UploadType" />
+ <element name="logitem" type="mw:LogItemType" />
</choice>
<!-- Zero or One sets of discussion threading data -->
@@ -157,11 +146,11 @@
<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" maxOccurs="1" />
- <element name="comment" type="mw:CommentType" minOccurs="0" maxOccurs="1" />
+ <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="mw:CommentType" minOccurs="0"/>
<element name="sha1" type="string" />
<element name="text" type="mw:TextType" />
</sequence>
@@ -169,15 +158,13 @@
<complexType name="LogItemType">
<sequence>
- <element name="id" type="positiveInteger" />
- <element name="timestamp" type="dateTime" />
- <element name="contributor" type="mw:ContributorType" />
- <element name="comment" type="mw:CommentType" minOccurs="0" />
+ <element name="id" type="positiveInteger" minOccurs="0"/>
+ <element name="timestamp" type="dateTime"/>
+ <element name="contributor" type="mw:ContributorType"/>
+ <element name="comment" type="mw:CommentType" minOccurs="0"/>
<element name="type" type="string" />
<element name="action" type="string" />
- <element name="text" type="mw:LogTextType" minOccurs="0" maxOccurs="1" />
- <element name="logtitle" type="string" minOccurs="0" maxOccurs="1" />
- <element name="params" type="mw:LogParamsType" minOccurs="0" maxOccurs="1" />
+ <element name="text" type="mw:TextType" />
</sequence>
</complexType>
@@ -185,7 +172,7 @@
<simpleContent>
<extension base="string">
<!-- This allows deleted=deleted on non-empty elements, but XSD is not omnipotent -->
- <attribute name="deleted" use="optional" type="mw:DeletedFlagType" />
+ <attribute name="deleted" use="optional" type="mw:DeletedFlagType"/>
</extension>
</simpleContent>
</complexType>
@@ -195,56 +182,39 @@
<extension base="string">
<attribute ref="xml:space" use="optional" default="preserve" />
<!-- This allows deleted=deleted on non-empty elements, but XSD is not omnipotent -->
- <attribute name="deleted" use="optional" type="mw:DeletedFlagType" />
+ <attribute name="deleted" use="optional" type="mw:DeletedFlagType"/>
<!-- This isn't a good idea; we should be using "ID" instead of "NMTOKEN" -->
<!-- However, "NMTOKEN" is strictest definition that is both compatible with existing -->
<!-- usage ([0-9]+) and with the "ID" type. -->
- <attribute name="id" type="NMTOKEN" />
- <attribute name="bytes" use="optional" type="nonNegativeInteger" />
- </extension>
- </simpleContent>
- </complexType>
-
- <complexType name="LogTextType">
- <simpleContent>
- <extension base="string">
- <!-- This allows deleted=deleted on non-empty elements, but XSD is not omnipotent -->
- <attribute name="deleted" use="optional" type="mw:DeletedFlagType" />
- </extension>
- </simpleContent>
- </complexType>
-
- <complexType name="LogParamsType">
- <simpleContent>
- <extension base="string">
- <attribute ref="xml:space" use="optional" default="preserve" />
+ <attribute name="id" type="NMTOKEN"/>
+ <attribute name="bytes" use="optional" type="nonNegativeInteger"/>
</extension>
</simpleContent>
</complexType>
<complexType name="ContributorType">
<sequence>
- <element name="username" type="string" minOccurs="0" />
+ <element name="username" type="string" minOccurs="0"/>
<element name="id" type="positiveInteger" minOccurs="0" />
- <element name="ip" type="string" minOccurs="0" />
+ <element name="ip" type="string" minOccurs="0"/>
</sequence>
<!-- This allows deleted=deleted on non-empty elements, but XSD is not omnipotent -->
- <attribute name="deleted" use="optional" type="mw:DeletedFlagType" />
+ <attribute name="deleted" use="optional" type="mw:DeletedFlagType"/>
</complexType>
<complexType name="UploadType">
<sequence>
<!-- Revision-style data... -->
- <element name="timestamp" type="dateTime" />
- <element name="contributor" type="mw:ContributorType" />
- <element name="comment" type="string" minOccurs="0" />
+ <element name="timestamp" type="dateTime"/>
+ <element name="contributor" type="mw:ContributorType"/>
+ <element name="comment" type="string" minOccurs="0"/>
- <!-- Filename. (Using underscores, not spaces. No 'File:' namespace marker.) -->
- <element name="filename" type="string" />
+ <!-- Filename. (Using underscores, not spaces. No 'Image:' namespace marker.) -->
+ <element name="filename" type="string"/>
<!-- URI at which this resource can be obtained -->
- <element name="src" type="anyURI" />
+ <element name="src" type="anyURI"/>
<element name="size" type="positiveInteger" />