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