oadr_atom.xsd 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <xs:schema xmlns:atom="http://www.w3.org/2005/Atom" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xml="http://www.w3.org/XML/1998/namespace" targetNamespace="http://www.w3.org/2005/Atom" elementFormDefault="qualified" attributeFormDefault="unqualified">
  3. <xs:annotation>
  4. <xs:documentation>
  5. This version of the Atom schema is based on version 1.0 of the format specifications,
  6. found here http://www.atomenabled.org/developers/syndication/atom-format-spec.php.
  7. </xs:documentation>
  8. </xs:annotation>
  9. <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="oadr_xml.xsd"/>
  10. <xs:annotation>
  11. <xs:documentation>
  12. An Atom document may have two root elements, feed and entry, as defined in section 2.
  13. </xs:documentation>
  14. </xs:annotation>
  15. <xs:element name="feed" type="atom:feedType"/>
  16. <xs:element name="entry" type="atom:entryType"/>
  17. <xs:complexType name="textType" mixed="true">
  18. <xs:annotation>
  19. <xs:documentation>
  20. The Atom text construct is defined in section 3.1 of the format spec.
  21. </xs:documentation>
  22. </xs:annotation>
  23. <xs:sequence>
  24. <xs:any namespace="http://www.w3.org/1999/xhtml" minOccurs="0"/>
  25. </xs:sequence>
  26. <xs:attribute name="type">
  27. <xs:simpleType>
  28. <xs:restriction base="xs:token">
  29. <xs:enumeration value="text"/>
  30. <xs:enumeration value="html"/>
  31. <xs:enumeration value="xhtml"/>
  32. </xs:restriction>
  33. </xs:simpleType>
  34. </xs:attribute>
  35. <xs:attributeGroup ref="atom:commonAttributes"/>
  36. </xs:complexType>
  37. <xs:complexType name="personType">
  38. <xs:annotation>
  39. <xs:documentation>
  40. The Atom person construct is defined in section 3.2 of the format spec.
  41. </xs:documentation>
  42. </xs:annotation>
  43. <xs:choice maxOccurs="unbounded">
  44. <xs:element name="name" type="xs:string"/>
  45. <xs:element name="uri" type="atom:uriType" minOccurs="0"/>
  46. <xs:element name="email" type="atom:emailType" minOccurs="0"/>
  47. <xs:any namespace="##other"/>
  48. </xs:choice>
  49. <xs:attributeGroup ref="atom:commonAttributes"/>
  50. </xs:complexType>
  51. <xs:simpleType name="emailType">
  52. <xs:annotation>
  53. <xs:documentation>
  54. Schema definition for an email address.
  55. </xs:documentation>
  56. </xs:annotation>
  57. <xs:restriction base="xs:normalizedString">
  58. <xs:pattern value="\w+@(\w+\.)+\w+"/>
  59. </xs:restriction>
  60. </xs:simpleType>
  61. <xs:complexType name="feedType">
  62. <xs:annotation>
  63. <xs:documentation>
  64. The Atom feed construct is defined in section 4.1.1 of the format spec.
  65. </xs:documentation>
  66. </xs:annotation>
  67. <xs:choice minOccurs="3" maxOccurs="unbounded">
  68. <xs:element name="author" type="atom:personType" minOccurs="0" maxOccurs="unbounded"/>
  69. <xs:element name="category" type="atom:categoryType" minOccurs="0" maxOccurs="unbounded"/>
  70. <xs:element name="contributor" type="atom:personType" minOccurs="0" maxOccurs="unbounded"/>
  71. <xs:element name="generator" type="atom:generatorType" minOccurs="0"/>
  72. <xs:element name="icon" type="atom:iconType" minOccurs="0"/>
  73. <xs:element name="id" type="atom:idType"/>
  74. <xs:element name="link" type="atom:linkType" minOccurs="0" maxOccurs="unbounded"/>
  75. <xs:element name="logo" type="atom:logoType" minOccurs="0"/>
  76. <xs:element name="rights" type="atom:textType" minOccurs="0"/>
  77. <xs:element name="subtitle" type="atom:textType" minOccurs="0"/>
  78. <xs:element name="title" type="atom:textType"/>
  79. <xs:element name="updated" type="atom:dateTimeType"/>
  80. <xs:element name="entry" type="atom:entryType" minOccurs="0" maxOccurs="unbounded"/>
  81. <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
  82. </xs:choice>
  83. <xs:attributeGroup ref="atom:commonAttributes"/>
  84. </xs:complexType>
  85. <xs:complexType name="entryType">
  86. <xs:annotation>
  87. <xs:documentation>
  88. The Atom entry construct is defined in section 4.1.2 of the format spec.
  89. </xs:documentation>
  90. </xs:annotation>
  91. <xs:choice maxOccurs="unbounded">
  92. <xs:element name="author" type="atom:personType" minOccurs="0" maxOccurs="unbounded"/>
  93. <xs:element name="category" type="atom:categoryType" minOccurs="0" maxOccurs="unbounded"/>
  94. <xs:element name="content" type="atom:contentType" minOccurs="0"/>
  95. <xs:element name="contributor" type="atom:personType" minOccurs="0" maxOccurs="unbounded"/>
  96. <xs:element name="id" type="atom:idType"/>
  97. <xs:element name="link" type="atom:linkType" minOccurs="0" maxOccurs="unbounded"/>
  98. <xs:element name="published" type="atom:dateTimeType" minOccurs="0"/>
  99. <xs:element name="rights" type="atom:textType" minOccurs="0"/>
  100. <xs:element name="source" type="atom:textType" minOccurs="0"/>
  101. <xs:element name="summary" type="atom:textType" minOccurs="0"/>
  102. <xs:element name="title" type="atom:textType"/>
  103. <xs:element name="updated" type="atom:dateTimeType"/>
  104. <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
  105. </xs:choice>
  106. <xs:attributeGroup ref="atom:commonAttributes"/>
  107. </xs:complexType>
  108. <xs:complexType name="contentType" mixed="true">
  109. <xs:annotation>
  110. <xs:documentation>
  111. The Atom content construct is defined in section 4.1.3 of the format spec.
  112. </xs:documentation>
  113. </xs:annotation>
  114. <xs:sequence>
  115. <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
  116. </xs:sequence>
  117. <xs:attribute name="type" type="xs:string"/>
  118. <xs:attribute name="src" type="xs:anyURI"/>
  119. <xs:attributeGroup ref="atom:commonAttributes"/>
  120. </xs:complexType>
  121. <xs:complexType name="categoryType">
  122. <xs:annotation>
  123. <xs:documentation>
  124. The Atom category construct is defined in section 4.2.2 of the format spec.
  125. </xs:documentation>
  126. </xs:annotation>
  127. <xs:attribute name="term" type="xs:string" use="required"/>
  128. <xs:attribute name="scheme" type="xs:anyURI" use="optional"/>
  129. <xs:attribute name="label" type="xs:string" use="optional"/>
  130. <xs:attributeGroup ref="atom:commonAttributes"/>
  131. </xs:complexType>
  132. <xs:complexType name="generatorType">
  133. <xs:annotation>
  134. <xs:documentation>
  135. The Atom generator element is defined in section 4.2.4 of the format spec.
  136. </xs:documentation>
  137. </xs:annotation>
  138. <xs:simpleContent>
  139. <xs:extension base="xs:string">
  140. <xs:attribute name="uri" type="xs:anyURI" use="optional"/>
  141. <xs:attribute name="version" type="xs:string" use="optional"/>
  142. <xs:attributeGroup ref="atom:commonAttributes"/>
  143. </xs:extension>
  144. </xs:simpleContent>
  145. </xs:complexType>
  146. <xs:complexType name="iconType">
  147. <xs:annotation>
  148. <xs:documentation>
  149. The Atom icon construct is defined in section 4.2.5 of the format spec.
  150. </xs:documentation>
  151. </xs:annotation>
  152. <xs:simpleContent>
  153. <xs:extension base="xs:anyURI">
  154. <xs:attributeGroup ref="atom:commonAttributes"/>
  155. </xs:extension>
  156. </xs:simpleContent>
  157. </xs:complexType>
  158. <xs:complexType name="idType">
  159. <xs:annotation>
  160. <xs:documentation>
  161. The Atom id construct is defined in section 4.2.6 of the format spec.
  162. </xs:documentation>
  163. </xs:annotation>
  164. <xs:simpleContent>
  165. <xs:extension base="xs:anyURI">
  166. <xs:attributeGroup ref="atom:commonAttributes"/>
  167. </xs:extension>
  168. </xs:simpleContent>
  169. </xs:complexType>
  170. <xs:complexType name="linkType" mixed="true">
  171. <xs:annotation>
  172. <xs:documentation>
  173. The Atom link construct is defined in section 3.4 of the format spec.
  174. </xs:documentation>
  175. </xs:annotation>
  176. <xs:attribute name="href" type="xs:anyURI" use="required"/>
  177. <xs:attribute name="rel" type="xs:string" use="optional"/>
  178. <xs:attribute name="type" type="xs:string" use="optional"/>
  179. <xs:attribute name="hreflang" type="xs:NMTOKEN" use="optional"/>
  180. <xs:attribute name="title" type="xs:string" use="optional"/>
  181. <xs:attribute name="length" type="xs:positiveInteger" use="optional"/>
  182. <xs:attributeGroup ref="atom:commonAttributes"/>
  183. </xs:complexType>
  184. <xs:complexType name="logoType">
  185. <xs:annotation>
  186. <xs:documentation>
  187. The Atom logo construct is defined in section 4.2.8 of the format spec.
  188. </xs:documentation>
  189. </xs:annotation>
  190. <xs:simpleContent>
  191. <xs:extension base="xs:anyURI">
  192. <xs:attributeGroup ref="atom:commonAttributes"/>
  193. </xs:extension>
  194. </xs:simpleContent>
  195. </xs:complexType>
  196. <xs:complexType name="sourceType">
  197. <xs:annotation>
  198. <xs:documentation>
  199. The Atom source construct is defined in section 4.2.11 of the format spec.
  200. </xs:documentation>
  201. </xs:annotation>
  202. <xs:choice maxOccurs="unbounded">
  203. <xs:element name="author" type="atom:personType" minOccurs="0" maxOccurs="unbounded"/>
  204. <xs:element name="category" type="atom:categoryType" minOccurs="0" maxOccurs="unbounded"/>
  205. <xs:element name="contributor" type="atom:personType" minOccurs="0" maxOccurs="unbounded"/>
  206. <xs:element name="generator" type="atom:generatorType" minOccurs="0"/>
  207. <xs:element name="icon" type="atom:iconType" minOccurs="0"/>
  208. <xs:element name="id" type="atom:idType" minOccurs="0"/>
  209. <xs:element name="link" type="atom:linkType" minOccurs="0" maxOccurs="unbounded"/>
  210. <xs:element name="logo" type="atom:logoType" minOccurs="0"/>
  211. <xs:element name="rights" type="atom:textType" minOccurs="0"/>
  212. <xs:element name="subtitle" type="atom:textType" minOccurs="0"/>
  213. <xs:element name="title" type="atom:textType" minOccurs="0"/>
  214. <xs:element name="updated" type="atom:dateTimeType" minOccurs="0"/>
  215. <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
  216. </xs:choice>
  217. <xs:attributeGroup ref="atom:commonAttributes"/>
  218. </xs:complexType>
  219. <xs:complexType name="uriType">
  220. <xs:simpleContent>
  221. <xs:extension base="xs:anyURI">
  222. <xs:attributeGroup ref="atom:commonAttributes"/>
  223. </xs:extension>
  224. </xs:simpleContent>
  225. </xs:complexType>
  226. <xs:complexType name="dateTimeType">
  227. <xs:simpleContent>
  228. <xs:extension base="xs:dateTime">
  229. <xs:attributeGroup ref="atom:commonAttributes"/>
  230. </xs:extension>
  231. </xs:simpleContent>
  232. </xs:complexType>
  233. <xs:attributeGroup name="commonAttributes">
  234. <xs:attribute ref="xml:base"/>
  235. <xs:attribute ref="xml:lang"/>
  236. <xs:anyAttribute namespace="##other"/>
  237. </xs:attributeGroup>
  238. </xs:schema>