r9101 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r9100‎ | r9101 | r9102 >
Date:09:37, 19 May 2005
Author:vibber
Status:old
Tags:
Comment:
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.
Modified paths:
  • /trunk/phase3/docs/export-0.2.xsd (added) (history)

Diff [purge]

Index: trunk/phase3/docs/export-0.2.xsd
@@ -0,0 +1,100 @@
 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+ The canonical URL to the schema document is:
 11+ http://www.mediawiki.org/xml/export-0.2.xsd
 12+
 13+ Use the namespace:
 14+ http://www.mediawiki.org/xml/export-0.2/
 15+-->
 16+<schema xmlns="http://www.w3.org/2001/XMLSchema"
 17+ xmlns:mw="http://www.mediawiki.org/xml/export-0.2/"
 18+ targetNamespace="http://www.mediawiki.org/xml/export-0.2/"
 19+ elementFormDefault="qualified">
 20+
 21+ <annotation>
 22+ <documentation xml:lang="en">
 23+ MediaWiki's page export format
 24+ </documentation>
 25+ </annotation>
 26+
 27+ <!-- Need this to reference xml:lang -->
 28+ <import namespace="http://www.w3.org/XML/1998/namespace"
 29+ schemaLocation="http://www.w3.org/2001/xml.xsd"/>
 30+
 31+ <!-- Our root element -->
 32+ <element name="mediawiki" type="mw:MediaWikiType"/>
 33+
 34+ <complexType name="MediaWikiType">
 35+ <sequence>
 36+ <element name="page" type="mw:PageType"
 37+ minOccurs="0" maxOccurs="unbounded"/>
 38+ </sequence>
 39+ <attribute name="version" type="string" use="required"/>
 40+ <attribute ref="xml:lang" use="required"/>
 41+ </complexType>
 42+
 43+ <complexType name="PageType">
 44+ <sequence>
 45+ <!-- Title in text form. (Using spaces, not underscores; with namespace ) -->
 46+ <element name="title" type="string"/>
 47+
 48+ <!-- optional page ID number -->
 49+ <element name="id" type="positiveInteger" minOccurs="0"/>
 50+
 51+ <!-- comma-separated list of string tokens, if present -->
 52+ <element name="restrictions" type="string" minOccurs="0"/>
 53+
 54+ <!-- Zero or more sets of revision or upload data -->
 55+ <choice minOccurs="0" maxOccurs="unbounded">
 56+ <element name="revision" type="mw:RevisionType" />
 57+ <element name="upload" type="mw:UploadType" />
 58+ </choice>
 59+ </sequence>
 60+ </complexType>
 61+
 62+ <complexType name="RevisionType">
 63+ <sequence>
 64+ <element name="id" type="positiveInteger" minOccurs="0"/>
 65+ <element name="timestamp" type="dateTime"/>
 66+ <element name="contributor" type="mw:ContributorType"/>
 67+ <element name="minor" minOccurs="0" />
 68+ <element name="comment" type="string" minOccurs="0"/>
 69+ <element name="text" type="string"/>
 70+ </sequence>
 71+ </complexType>
 72+
 73+ <complexType name="ContributorType">
 74+ <sequence>
 75+ <element name="username" type="string" minOccurs="0"/>
 76+ <element name="id" type="positiveInteger" minOccurs="0" />
 77+
 78+ <element name="ip" type="string" minOccurs="0"/>
 79+ </sequence>
 80+ </complexType>
 81+
 82+ <complexType name="UploadType">
 83+ <sequence>
 84+ <!-- Revision-style data... -->
 85+ <element name="timestamp" type="dateTime"/>
 86+ <element name="contributor" type="mw:ContributorType"/>
 87+ <element name="comment" type="string" minOccurs="0"/>
 88+
 89+ <!-- Filename. (Using underscores, not spaces. No 'Image:' namespace marker.) -->
 90+ <element name="filename" type="string"/>
 91+
 92+ <!-- URI at which this resource can be obtained -->
 93+ <element name="src" type="anyURI"/>
 94+
 95+ <element name="size" type="positiveInteger" />
 96+
 97+ <!-- TODO: add other metadata fields -->
 98+ </sequence>
 99+ </complexType>
 100+
 101+</schema>
Property changes on: trunk/phase3/docs/export-0.2.xsd
___________________________________________________________________
Added: svn:eol-style
1102 + native
Added: svn:keywords
2103 + Author Date Id Revision

Status & tagging log