diff options
author | Brion Vibber <brion@users.mediawiki.org> | 2005-05-19 09:37:12 +0000 |
---|---|---|
committer | Brion Vibber <brion@users.mediawiki.org> | 2005-05-19 09:37:12 +0000 |
commit | a7ed5c0ec6613a44a42faa3a6b86945b64251a81 (patch) | |
tree | c5ad4643049b8086ba06df62d8d5459e9d993e61 /docs/export-0.2.xsd | |
parent | 4d99e93d66ae7a9964ce2515e9dfb55eeb185f69 (diff) | |
download | mediawikicore-a7ed5c0ec6613a44a42faa3a6b86945b64251a81.tar.gz mediawikicore-a7ed5c0ec6613a44a42faa3a6b86945b64251a81.zip |
Updated export schema: added an <upload> element which may be used in
<page>s alongside <revision>s. For image pages these will contain
file data: filename, size, URL at which it can be found.
This is used by the OAI updater system.
Notes
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/9101
Diffstat (limited to 'docs/export-0.2.xsd')
-rw-r--r-- | docs/export-0.2.xsd | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/docs/export-0.2.xsd b/docs/export-0.2.xsd new file mode 100644 index 000000000000..8acbf543b984 --- /dev/null +++ b/docs/export-0.2.xsd @@ -0,0 +1,100 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!-- + This is an XML Schema description of the format + output by MediaWiki's Special:Export system. + + Version 0.2 adds optional basic file upload info support, + which is used by our OAI export/import submodule. + + The canonical URL to the schema document is: + http://www.mediawiki.org/xml/export-0.2.xsd + + Use the namespace: + http://www.mediawiki.org/xml/export-0.2/ +--> +<schema xmlns="http://www.w3.org/2001/XMLSchema" + xmlns:mw="http://www.mediawiki.org/xml/export-0.2/" + targetNamespace="http://www.mediawiki.org/xml/export-0.2/" + 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 or upload data --> + <choice minOccurs="0" maxOccurs="unbounded"> + <element name="revision" type="mw:RevisionType" /> + <element name="upload" type="mw:UploadType" /> + </choice> + </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> + + <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"/> + + <!-- 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="size" type="positiveInteger" /> + + <!-- TODO: add other metadata fields --> + </sequence> + </complexType> + +</schema> |