xml.xsd 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. <?xml version='1.0'?>
  2. <?xml-stylesheet href="../2008/09/xsd.xsl" type="text/xsl"?>
  3. <xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace"
  4. xmlns:xs="http://www.w3.org/2001/XMLSchema"
  5. xmlns ="http://www.w3.org/1999/xhtml"
  6. xml:lang="en">
  7. <xs:annotation>
  8. <xs:documentation>
  9. <div>
  10. <h1>About the XML namespace</h1>
  11. <div class="bodytext">
  12. <p>
  13. This schema document describes the XML namespace, in a form
  14. suitable for import by other schema documents.
  15. </p>
  16. <p>
  17. See <a href="http://www.w3.org/XML/1998/namespace.html">
  18. http://www.w3.org/XML/1998/namespace.html</a> and
  19. <a href="http://www.w3.org/TR/REC-xml">
  20. http://www.w3.org/TR/REC-xml</a> for information
  21. about this namespace.
  22. </p>
  23. <p>
  24. Note that local names in this namespace are intended to be
  25. defined only by the World Wide Web Consortium or its subgroups.
  26. The names currently defined in this namespace are listed below.
  27. They should not be used with conflicting semantics by any Working
  28. Group, specification, or document instance.
  29. </p>
  30. <p>
  31. See further below in this document for more information about <a
  32. href="#usage">how to refer to this schema document from your own
  33. XSD schema documents</a> and about <a href="#nsversioning">the
  34. namespace-versioning policy governing this schema document</a>.
  35. </p>
  36. </div>
  37. </div>
  38. </xs:documentation>
  39. </xs:annotation>
  40. <xs:attribute name="lang">
  41. <xs:annotation>
  42. <xs:documentation>
  43. <div>
  44. <h3>lang (as an attribute name)</h3>
  45. <p>
  46. denotes an attribute whose value
  47. is a language code for the natural language of the content of
  48. any element; its value is inherited. This name is reserved
  49. by virtue of its definition in the XML specification.</p>
  50. </div>
  51. <div>
  52. <h4>Notes</h4>
  53. <p>
  54. Attempting to install the relevant ISO 2- and 3-letter
  55. codes as the enumerated possible values is probably never
  56. going to be a realistic possibility.
  57. </p>
  58. <p>
  59. See BCP 47 at <a href="http://www.rfc-editor.org/rfc/bcp/bcp47.txt">
  60. http://www.rfc-editor.org/rfc/bcp/bcp47.txt</a>
  61. and the IANA language subtag registry at
  62. <a href="http://www.iana.org/assignments/language-subtag-registry">
  63. http://www.iana.org/assignments/language-subtag-registry</a>
  64. for further information.
  65. </p>
  66. <p>
  67. The union allows for the 'un-declaration' of xml:lang with
  68. the empty string.
  69. </p>
  70. </div>
  71. </xs:documentation>
  72. </xs:annotation>
  73. <xs:simpleType>
  74. <xs:union memberTypes="xs:language">
  75. <xs:simpleType>
  76. <xs:restriction base="xs:string">
  77. <xs:enumeration value=""/>
  78. </xs:restriction>
  79. </xs:simpleType>
  80. </xs:union>
  81. </xs:simpleType>
  82. </xs:attribute>
  83. <xs:attribute name="space">
  84. <xs:annotation>
  85. <xs:documentation>
  86. <div>
  87. <h3>space (as an attribute name)</h3>
  88. <p>
  89. denotes an attribute whose
  90. value is a keyword indicating what whitespace processing
  91. discipline is intended for the content of the element; its
  92. value is inherited. This name is reserved by virtue of its
  93. definition in the XML specification.</p>
  94. </div>
  95. </xs:documentation>
  96. </xs:annotation>
  97. <xs:simpleType>
  98. <xs:restriction base="xs:NCName">
  99. <xs:enumeration value="default"/>
  100. <xs:enumeration value="preserve"/>
  101. </xs:restriction>
  102. </xs:simpleType>
  103. </xs:attribute>
  104. <xs:attribute name="base" type="xs:anyURI"> <xs:annotation>
  105. <xs:documentation>
  106. <div>
  107. <h3>base (as an attribute name)</h3>
  108. <p>
  109. denotes an attribute whose value
  110. provides a URI to be used as the base for interpreting any
  111. relative URIs in the scope of the element on which it
  112. appears; its value is inherited. This name is reserved
  113. by virtue of its definition in the XML Base specification.</p>
  114. <p>
  115. See <a
  116. href="http://www.w3.org/TR/xmlbase/">http://www.w3.org/TR/xmlbase/</a>
  117. for information about this attribute.
  118. </p>
  119. </div>
  120. </xs:documentation>
  121. </xs:annotation>
  122. </xs:attribute>
  123. <xs:attribute name="id" type="xs:ID">
  124. <xs:annotation>
  125. <xs:documentation>
  126. <div>
  127. <h3>id (as an attribute name)</h3>
  128. <p>
  129. denotes an attribute whose value
  130. should be interpreted as if declared to be of type ID.
  131. This name is reserved by virtue of its definition in the
  132. xml:id specification.</p>
  133. <p>
  134. See <a
  135. href="http://www.w3.org/TR/xml-id/">http://www.w3.org/TR/xml-id/</a>
  136. for information about this attribute.
  137. </p>
  138. </div>
  139. </xs:documentation>
  140. </xs:annotation>
  141. </xs:attribute>
  142. <xs:attributeGroup name="specialAttrs">
  143. <xs:attribute ref="xml:base"/>
  144. <xs:attribute ref="xml:lang"/>
  145. <xs:attribute ref="xml:space"/>
  146. <xs:attribute ref="xml:id"/>
  147. </xs:attributeGroup>
  148. <xs:annotation>
  149. <xs:documentation>
  150. <div>
  151. <h3>Father (in any context at all)</h3>
  152. <div class="bodytext">
  153. <p>
  154. denotes Jon Bosak, the chair of
  155. the original XML Working Group. This name is reserved by
  156. the following decision of the W3C XML Plenary and
  157. XML Coordination groups:
  158. </p>
  159. <blockquote>
  160. <p>
  161. In appreciation for his vision, leadership and
  162. dedication the W3C XML Plenary on this 10th day of
  163. February, 2000, reserves for Jon Bosak in perpetuity
  164. the XML name "xml:Father".
  165. </p>
  166. </blockquote>
  167. </div>
  168. </div>
  169. </xs:documentation>
  170. </xs:annotation>
  171. <xs:annotation>
  172. <xs:documentation>
  173. <div xml:id="usage" id="usage">
  174. <h2><a name="usage">About this schema document</a></h2>
  175. <div class="bodytext">
  176. <p>
  177. This schema defines attributes and an attribute group suitable
  178. for use by schemas wishing to allow <code>xml:base</code>,
  179. <code>xml:lang</code>, <code>xml:space</code> or
  180. <code>xml:id</code> attributes on elements they define.
  181. </p>
  182. <p>
  183. To enable this, such a schema must import this schema for
  184. the XML namespace, e.g. as follows:
  185. </p>
  186. <pre>
  187. &lt;schema . . .>
  188. . . .
  189. &lt;import namespace="http://www.w3.org/XML/1998/namespace"
  190. schemaLocation="http://www.w3.org/2001/xml.xsd"/>
  191. </pre>
  192. <p>
  193. or
  194. </p>
  195. <pre>
  196. &lt;import namespace="http://www.w3.org/XML/1998/namespace"
  197. schemaLocation="http://www.w3.org/2009/01/xml.xsd"/>
  198. </pre>
  199. <p>
  200. Subsequently, qualified reference to any of the attributes or the
  201. group defined below will have the desired effect, e.g.
  202. </p>
  203. <pre>
  204. &lt;type . . .>
  205. . . .
  206. &lt;attributeGroup ref="xml:specialAttrs"/>
  207. </pre>
  208. <p>
  209. will define a type which will schema-validate an instance element
  210. with any of those attributes.
  211. </p>
  212. </div>
  213. </div>
  214. </xs:documentation>
  215. </xs:annotation>
  216. <xs:annotation>
  217. <xs:documentation>
  218. <div id="nsversioning" xml:id="nsversioning">
  219. <h2><a name="nsversioning">Versioning policy for this schema document</a></h2>
  220. <div class="bodytext">
  221. <p>
  222. In keeping with the XML Schema WG's standard versioning
  223. policy, this schema document will persist at
  224. <a href="http://www.w3.org/2009/01/xml.xsd">
  225. http://www.w3.org/2009/01/xml.xsd</a>.
  226. </p>
  227. <p>
  228. At the date of issue it can also be found at
  229. <a href="http://www.w3.org/2001/xml.xsd">
  230. http://www.w3.org/2001/xml.xsd</a>.
  231. </p>
  232. <p>
  233. The schema document at that URI may however change in the future,
  234. in order to remain compatible with the latest version of XML
  235. Schema itself, or with the XML namespace itself. In other words,
  236. if the XML Schema or XML namespaces change, the version of this
  237. document at <a href="http://www.w3.org/2001/xml.xsd">
  238. http://www.w3.org/2001/xml.xsd
  239. </a>
  240. will change accordingly; the version at
  241. <a href="http://www.w3.org/2009/01/xml.xsd">
  242. http://www.w3.org/2009/01/xml.xsd
  243. </a>
  244. will not change.
  245. </p>
  246. <p>
  247. Previous dated (and unchanging) versions of this schema
  248. document are at:
  249. </p>
  250. <ul>
  251. <li><a href="http://www.w3.org/2009/01/xml.xsd">
  252. http://www.w3.org/2009/01/xml.xsd</a></li>
  253. <li><a href="http://www.w3.org/2007/08/xml.xsd">
  254. http://www.w3.org/2007/08/xml.xsd</a></li>
  255. <li><a href="http://www.w3.org/2004/10/xml.xsd">
  256. http://www.w3.org/2004/10/xml.xsd</a></li>
  257. <li><a href="http://www.w3.org/2001/03/xml.xsd">
  258. http://www.w3.org/2001/03/xml.xsd</a></li>
  259. </ul>
  260. </div>
  261. </div>
  262. </xs:documentation>
  263. </xs:annotation>
  264. </xs:schema>