Index: trunk/phase3/docs/export-demo.xml |
— | — | @@ -0,0 +1,115 @@ |
| 2 | +<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.3/ http://www.mediawiki.org/xml/export-0.3.xsd" version="0.3" xml:lang="en"> |
| 3 | + |
| 4 | +<!-- Optional global configuration info --> |
| 5 | +<siteinfo> |
| 6 | + <!-- Site name, as set in $wgSitename --> |
| 7 | + <sitename>DemoWiki</sitename> |
| 8 | + |
| 9 | + <!-- Forgot where you got this set? --> |
| 10 | + <base>http://example.com/wiki/Main_Page</base> |
| 11 | + |
| 12 | + <!-- Source software version --> |
| 13 | + <generator>MediaWiki 1.5.0</generator> |
| 14 | + |
| 15 | + <!-- Title case sensitivity options of the wiki this data came from --> |
| 16 | + <!-- May be 'first-letter', 'case-sensitive', or 'case-insensitive' --> |
| 17 | + <case>first-letter</case> |
| 18 | + |
| 19 | + <!-- Defined namespace keys on the source wiki. --> |
| 20 | + <!-- Titles can be substring-split to obtain the symbolic numeric key --> |
| 21 | + <namespaces> |
| 22 | + <namespace key="-2">Media</namespace> |
| 23 | + <namespace key="-1">Special</namespace> |
| 24 | + <namespace key="0"></namespace> |
| 25 | + <namespace key="1">Talk</namespace> |
| 26 | + <namespace key="2">User</namespace> |
| 27 | + <namespace key="3">User talk</namespace> |
| 28 | + <namespace key="4">DemoWiki</namespace> |
| 29 | + <namespace key="5">DemoWIki talk</namespace> |
| 30 | + <namespace key="6">Image</namespace> |
| 31 | + <namespace key="7">Image talk</namespace> |
| 32 | + <namespace key="8">MediaWiki</namespace> |
| 33 | + <namespace key="9">MediaWiki talk</namespace> |
| 34 | + <namespace key="10">Template</namespace> |
| 35 | + <namespace key="11">Template talk</namespace> |
| 36 | + <namespace key="12">Help</namespace> |
| 37 | + <namespace key="13">Help talk</namespace> |
| 38 | + <namespace key="14">Category</namespace> |
| 39 | + <namespace key="15">Category talk</namespace> |
| 40 | + </namespaces> |
| 41 | +</siteinfo> |
| 42 | + |
| 43 | +<!-- The rest of the data will be a series of page records --> |
| 44 | +<page> |
| 45 | + <!-- Titles are listed here in text form, with namespace prefix --> |
| 46 | + <!-- if any, and spaces rather than the underscores used in URLs. --> |
| 47 | + <title>Page title</title> |
| 48 | + |
| 49 | + <!-- The page's immutable page_id number in the source database. --> |
| 50 | + <!-- Page ID numbers are kept across page moves, but may change --> |
| 51 | + <!-- if a page is deleted and recreated. --> |
| 52 | + <id>1</id> |
| 53 | + |
| 54 | + <!-- If restricted, the ACL is listed here raw. --> |
| 55 | + <restrictions>edit=sysop:move=sysop</restrictions> |
| 56 | + |
| 57 | + <!-- With a series of revision records... --> |
| 58 | + |
| 59 | + <!-- Remember this is XML; if you must use a regex-based extractor --> |
| 60 | + <!-- in place of a standard XML parser, be very careful. --> |
| 61 | + <!-- * Don't forget to decode character entities! --> |
| 62 | + <!-- * If using a 'loose' XML parser, ensure that whitespace is --> |
| 63 | + <!-- preserved in the <text> elements. --> |
| 64 | + <revision> |
| 65 | + <!-- Unique revision ID number (rev_id) in the source database. --> |
| 66 | + <!-- This number uniquely identifies the revision on that wiki. --> |
| 67 | + <id>100</id> |
| 68 | + |
| 69 | + <timestamp>2001-01-15T13:15:00Z</timestamp> |
| 70 | + <contributor><username>Foobar</username><id>42</id></contributor> |
| 71 | + <minor /> |
| 72 | + <comment>I have just one thing to say!</comment> |
| 73 | + <text>A bunch of [[text]] here.</text> |
| 74 | + </revision> |
| 75 | + |
| 76 | + <revision> |
| 77 | + <timestamp>2001-01-15T13:10:27Z</timestamp> |
| 78 | + <contributor><ip>10.0.0.2</ip></contributor> |
| 79 | + <comment>new!</comment> |
| 80 | + <text>An earlier [[revision]].</text> |
| 81 | + </revision> |
| 82 | +</page> |
| 83 | + |
| 84 | +<page> |
| 85 | + <title>Talk:Page title</title> |
| 86 | + <id>2</id> |
| 87 | + <revision> |
| 88 | + <id>101</id> |
| 89 | + <timestamp>2001-01-15T14:03:00Z</timestamp> |
| 90 | + <contributor><ip>10.0.0.2</ip></contributor> |
| 91 | + <comment>hey</comment> |
| 92 | + <text>WHYD YOU LOCK PAGE??!!! i was editing that jerk</text> |
| 93 | + </revision> |
| 94 | +</page> |
| 95 | + |
| 96 | +<page> |
| 97 | + <title>Image:Some image.jpg</title> |
| 98 | + <id>3</id> |
| 99 | + <revision> |
| 100 | + <id>102</id> |
| 101 | + <timestamp>2001-01-15T20:34:12Z</timestamp> |
| 102 | + <contributor><username>Foobar</username><id>42</id></contributor> |
| 103 | + <comment>My awesomeest image!</comment> |
| 104 | + <text>This is an awesome little imgae. I lurves it. {{PD}}</text> |
| 105 | + </revision> |
| 106 | + <upload> |
| 107 | + <timestamp>2001-01-15T20:34:12Z</timestamp> |
| 108 | + <contributor><username>Foobar</username><id>42</id></contributor> |
| 109 | + <comment>My awesomeest image!</comment> |
| 110 | + <filename>Some_image.jpg</filename> |
| 111 | + <src>http://upload.wikimedia.org/commons/2/22/Some_image.jpg</src> |
| 112 | + <size>12345</size> |
| 113 | + </upload> |
| 114 | +</page> |
| 115 | + |
| 116 | +</mediawiki> |
Property changes on: trunk/phase3/docs/export-demo.xml |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 117 | + native |
Added: svn:keywords |
2 | 118 | + Author Date Id Revision |
Index: trunk/phase3/docs/export-0.3.xsd |
— | — | @@ -0,0 +1,146 @@ |
| 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 | + The canonical URL to the schema document is: |
| 14 | + http://www.mediawiki.org/xml/export-0.3.xsd |
| 15 | + |
| 16 | + Use the namespace: |
| 17 | + http://www.mediawiki.org/xml/export-0.3/ |
| 18 | +--> |
| 19 | +<schema xmlns="http://www.w3.org/2001/XMLSchema" |
| 20 | + xmlns:mw="http://www.mediawiki.org/xml/export-0.3/" |
| 21 | + targetNamespace="http://www.mediawiki.org/xml/export-0.3/" |
| 22 | + elementFormDefault="qualified"> |
| 23 | + |
| 24 | + <annotation> |
| 25 | + <documentation xml:lang="en"> |
| 26 | + MediaWiki's page export format |
| 27 | + </documentation> |
| 28 | + </annotation> |
| 29 | + |
| 30 | + <!-- Need this to reference xml:lang --> |
| 31 | + <import namespace="http://www.w3.org/XML/1998/namespace" |
| 32 | + schemaLocation="http://www.w3.org/2001/xml.xsd"/> |
| 33 | + |
| 34 | + <!-- Our root element --> |
| 35 | + <element name="mediawiki" type="mw:MediaWikiType"/> |
| 36 | + |
| 37 | + <complexType name="MediaWikiType"> |
| 38 | + <sequence> |
| 39 | + <element name="siteinfo" type="mw:SiteInfoType" |
| 40 | + minOccurs="0" maxOccurs="1"/> |
| 41 | + <element name="page" type="mw:PageType" |
| 42 | + minOccurs="0" maxOccurs="unbounded"/> |
| 43 | + </sequence> |
| 44 | + <attribute name="version" type="string" use="required"/> |
| 45 | + <attribute ref="xml:lang" use="required"/> |
| 46 | + </complexType> |
| 47 | + |
| 48 | + <complexType name="SiteInfoType"> |
| 49 | + <sequence> |
| 50 | + <element name="sitename" type="string" minOccurs="0" /> |
| 51 | + <element name="base" type="anyURI" minOccurs="0" /> |
| 52 | + <element name="generator" type="string" minOccurs="0" /> |
| 53 | + <element name="case" type="mw:CaseType" minOccurs="0" /> |
| 54 | + <element name="namespaces" type="mw:NamespacesType" minOccurs="0" /> |
| 55 | + </sequence> |
| 56 | + </complexType> |
| 57 | + |
| 58 | + <simpleType name="CaseType"> |
| 59 | + <restriction base="NMTOKEN"> |
| 60 | + <!-- Cannot have two titles differing only by case of first letter. --> |
| 61 | + <!-- Default behavior through 1.5, $wgCapitalLinks = true --> |
| 62 | + <enumeration value="first-letter" /> |
| 63 | + |
| 64 | + <!-- Complete title is case-sensitive --> |
| 65 | + <!-- Behavior when $wgCapitalLinks = false --> |
| 66 | + <enumeration value="case-sensitive" /> |
| 67 | + |
| 68 | + <!-- Cannot have two titles differing only by case. --> |
| 69 | + <!-- Not yet implemented as of MediaWiki 1.5 --> |
| 70 | + <enumeration value="case-insensitive" /> |
| 71 | + </restriction> |
| 72 | + </simpleType> |
| 73 | + |
| 74 | + <complexType name="NamespacesType"> |
| 75 | + <sequence> |
| 76 | + <element name="namespace" type="mw:NamespaceType" |
| 77 | + minOccurs="0" maxOccurs="unbounded" /> |
| 78 | + </sequence> |
| 79 | + </complexType> |
| 80 | + |
| 81 | + <complexType name="NamespaceType"> |
| 82 | + <simpleContent> |
| 83 | + <extension base="string"> |
| 84 | + <attribute name="key" type="integer" /> |
| 85 | + </extension> |
| 86 | + </simpleContent> |
| 87 | + </complexType> |
| 88 | + |
| 89 | + <complexType name="PageType"> |
| 90 | + <sequence> |
| 91 | + <!-- Title in text form. (Using spaces, not underscores; with namespace ) --> |
| 92 | + <element name="title" type="string"/> |
| 93 | + |
| 94 | + <!-- optional page ID number --> |
| 95 | + <element name="id" type="positiveInteger" minOccurs="0"/> |
| 96 | + |
| 97 | + <!-- comma-separated list of string tokens, if present --> |
| 98 | + <element name="restrictions" type="string" minOccurs="0"/> |
| 99 | + |
| 100 | + <!-- Zero or more sets of revision or upload data --> |
| 101 | + <choice minOccurs="0" maxOccurs="unbounded"> |
| 102 | + <element name="revision" type="mw:RevisionType" /> |
| 103 | + <element name="upload" type="mw:UploadType" /> |
| 104 | + </choice> |
| 105 | + </sequence> |
| 106 | + </complexType> |
| 107 | + |
| 108 | + <complexType name="RevisionType"> |
| 109 | + <sequence> |
| 110 | + <element name="id" type="positiveInteger" minOccurs="0"/> |
| 111 | + <element name="timestamp" type="dateTime"/> |
| 112 | + <element name="contributor" type="mw:ContributorType"/> |
| 113 | + <element name="minor" minOccurs="0" /> |
| 114 | + <element name="comment" type="string" minOccurs="0"/> |
| 115 | + <element name="text" type="string"/> |
| 116 | + </sequence> |
| 117 | + </complexType> |
| 118 | + |
| 119 | + <complexType name="ContributorType"> |
| 120 | + <sequence> |
| 121 | + <element name="username" type="string" minOccurs="0"/> |
| 122 | + <element name="id" type="positiveInteger" minOccurs="0" /> |
| 123 | + |
| 124 | + <element name="ip" type="string" minOccurs="0"/> |
| 125 | + </sequence> |
| 126 | + </complexType> |
| 127 | + |
| 128 | + <complexType name="UploadType"> |
| 129 | + <sequence> |
| 130 | + <!-- Revision-style data... --> |
| 131 | + <element name="timestamp" type="dateTime"/> |
| 132 | + <element name="contributor" type="mw:ContributorType"/> |
| 133 | + <element name="comment" type="string" minOccurs="0"/> |
| 134 | + |
| 135 | + <!-- Filename. (Using underscores, not spaces. No 'Image:' namespace marker.) --> |
| 136 | + <element name="filename" type="string"/> |
| 137 | + |
| 138 | + <!-- URI at which this resource can be obtained --> |
| 139 | + <element name="src" type="anyURI"/> |
| 140 | + |
| 141 | + <element name="size" type="positiveInteger" /> |
| 142 | + |
| 143 | + <!-- TODO: add other metadata fields --> |
| 144 | + </sequence> |
| 145 | + </complexType> |
| 146 | + |
| 147 | +</schema> |
Property changes on: trunk/phase3/docs/export-0.3.xsd |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 148 | + native |
Added: svn:keywords |
2 | 149 | + Author Date Id Revision |