export-0.2.xsd 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!--
  3. This is an XML Schema description of the format
  4. output by MediaWiki's Special:Export system.
  5. Version 0.2 adds optional basic file upload info support,
  6. which is used by our OAI export/import submodule.
  7. The canonical URL to the schema document is:
  8. http://www.mediawiki.org/xml/export-0.2.xsd
  9. Use the namespace:
  10. http://www.mediawiki.org/xml/export-0.2/
  11. -->
  12. <schema xmlns="http://www.w3.org/2001/XMLSchema"
  13. xmlns:mw="http://www.mediawiki.org/xml/export-0.2/"
  14. targetNamespace="http://www.mediawiki.org/xml/export-0.2/"
  15. elementFormDefault="qualified">
  16. <annotation>
  17. <documentation xml:lang="en">
  18. MediaWiki's page export format
  19. </documentation>
  20. </annotation>
  21. <!-- Need this to reference xml:lang -->
  22. <import namespace="http://www.w3.org/XML/1998/namespace"
  23. schemaLocation="http://www.w3.org/2001/xml.xsd"/>
  24. <!-- Our root element -->
  25. <element name="mediawiki" type="mw:MediaWikiType"/>
  26. <complexType name="MediaWikiType">
  27. <sequence>
  28. <element name="page" type="mw:PageType"
  29. minOccurs="0" maxOccurs="unbounded"/>
  30. </sequence>
  31. <attribute name="version" type="string" use="required"/>
  32. <attribute ref="xml:lang" use="required"/>
  33. </complexType>
  34. <complexType name="PageType">
  35. <sequence>
  36. <!-- Title in text form. (Using spaces, not underscores; with namespace ) -->
  37. <element name="title" type="string"/>
  38. <!-- optional page ID number -->
  39. <element name="id" type="positiveInteger" minOccurs="0"/>
  40. <!-- comma-separated list of string tokens, if present -->
  41. <element name="restrictions" type="string" minOccurs="0"/>
  42. <!-- Zero or more sets of revision or upload data -->
  43. <choice minOccurs="0" maxOccurs="unbounded">
  44. <element name="revision" type="mw:RevisionType" />
  45. <element name="upload" type="mw:UploadType" />
  46. </choice>
  47. </sequence>
  48. </complexType>
  49. <complexType name="RevisionType">
  50. <sequence>
  51. <element name="id" type="positiveInteger" minOccurs="0"/>
  52. <element name="timestamp" type="dateTime"/>
  53. <element name="contributor" type="mw:ContributorType"/>
  54. <element name="minor" minOccurs="0" />
  55. <element name="comment" type="string" minOccurs="0"/>
  56. <element name="text" type="string"/>
  57. </sequence>
  58. </complexType>
  59. <complexType name="ContributorType">
  60. <sequence>
  61. <element name="username" type="string" minOccurs="0"/>
  62. <element name="id" type="positiveInteger" minOccurs="0" />
  63. <element name="ip" type="string" minOccurs="0"/>
  64. </sequence>
  65. </complexType>
  66. <complexType name="UploadType">
  67. <sequence>
  68. <!-- Revision-style data... -->
  69. <element name="timestamp" type="dateTime"/>
  70. <element name="contributor" type="mw:ContributorType"/>
  71. <element name="comment" type="string" minOccurs="0"/>
  72. <!-- Filename. (Using underscores, not spaces. No 'Image:' namespace marker.) -->
  73. <element name="filename" type="string"/>
  74. <!-- URI at which this resource can be obtained -->
  75. <element name="src" type="anyURI"/>
  76. <element name="size" type="positiveInteger" />
  77. <!-- TODO: add other metadata fields -->
  78. </sequence>
  79. </complexType>
  80. </schema>