xml.xsd 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en">
  3. <xs:annotation>
  4. <xs:documentation>
  5. See http://www.w3.org/XML/1998/namespace.html and
  6. http://www.w3.org/TR/REC-xml for information about this namespace.
  7. This schema document describes the XML namespace, in a form
  8. suitable for import by other schema documents.
  9. Note that local names in this namespace are intended to be defined
  10. only by the World Wide Web Consortium or its subgroups. The
  11. following names are currently defined in this namespace and should
  12. not be used with conflicting semantics by any Working Group,
  13. specification, or document instance:
  14. base (as an attribute name): denotes an attribute whose value
  15. provides a URI to be used as the base for interpreting any
  16. relative URIs in the scope of the element on which it
  17. appears; its value is inherited. This name is reserved
  18. by virtue of its definition in the XML Base specification.
  19. id (as an attribute name): denotes an attribute whose value
  20. should be interpreted as if declared to be of type ID.
  21. This name is reserved by virtue of its definition in the
  22. xml:id specification.
  23. lang (as an attribute name): denotes an attribute whose value
  24. is a language code for the natural language of the content of
  25. any element; its value is inherited. This name is reserved
  26. by virtue of its definition in the XML specification.
  27. space (as an attribute name): denotes an attribute whose
  28. value is a keyword indicating what whitespace processing
  29. discipline is intended for the content of the element; its
  30. value is inherited. This name is reserved by virtue of its
  31. definition in the XML specification.
  32. Father (in any context at all): denotes Jon Bosak, the chair of
  33. the original XML Working Group. This name is reserved by
  34. the following decision of the W3C XML Plenary and
  35. XML Coordination groups:
  36. In appreciation for his vision, leadership and dedication
  37. the W3C XML Plenary on this 10th day of February, 2000
  38. reserves for Jon Bosak in perpetuity the XML name
  39. xml:Father
  40. </xs:documentation>
  41. </xs:annotation>
  42. <xs:annotation>
  43. <xs:documentation>This schema defines attributes and an attribute group
  44. suitable for use by
  45. schemas wishing to allow xml:base, xml:lang, xml:space or xml:id
  46. attributes on elements they define.
  47. To enable this, such a schema must import this schema
  48. for the XML namespace, e.g. as follows:
  49. &lt;schema . . .&gt;
  50. . . .
  51. &lt;import namespace="http://www.w3.org/XML/1998/namespace"
  52. schemaLocation="http://www.w3.org/2001/xml.xsd"/&gt;
  53. Subsequently, qualified reference to any of the attributes
  54. or the group defined below will have the desired effect, e.g.
  55. &lt;type . . .&gt;
  56. . . .
  57. &lt;attributeGroup ref="xml:specialAttrs"/&gt;
  58. will define a type which will schema-validate an instance
  59. element with any of those attributes</xs:documentation>
  60. </xs:annotation>
  61. <xs:annotation>
  62. <xs:documentation>In keeping with the XML Schema WG's standard versioning
  63. policy, this schema document will persist at
  64. http://www.w3.org/2007/08/xml.xsd.
  65. At the date of issue it can also be found at
  66. http://www.w3.org/2001/xml.xsd.
  67. The schema document at that URI may however change in the future,
  68. in order to remain compatible with the latest version of XML Schema
  69. itself, or with the XML namespace itself. In other words, if the XML
  70. Schema or XML namespaces change, the version of this document at
  71. http://www.w3.org/2001/xml.xsd will change
  72. accordingly; the version at
  73. http://www.w3.org/2007/08/xml.xsd will not change.
  74. </xs:documentation>
  75. </xs:annotation>
  76. <xs:attribute name="lang">
  77. <xs:annotation>
  78. <xs:documentation>Attempting to install the relevant ISO 2- and 3-letter
  79. codes as the enumerated possible values is probably never
  80. going to be a realistic possibility. See
  81. RFC 3066 at http://www.ietf.org/rfc/rfc3066.txt and the IANA registry
  82. at http://www.iana.org/assignments/lang-tag-apps.htm for
  83. further information.
  84. The union allows for the 'un-declaration' of xml:lang with
  85. the empty string.</xs:documentation>
  86. </xs:annotation>
  87. <xs:simpleType>
  88. <xs:union memberTypes="xs:language">
  89. <xs:simpleType>
  90. <xs:restriction base="xs:string">
  91. <xs:enumeration value=""/>
  92. </xs:restriction>
  93. </xs:simpleType>
  94. </xs:union>
  95. </xs:simpleType>
  96. </xs:attribute>
  97. <xs:attribute name="space">
  98. <xs:simpleType>
  99. <xs:restriction base="xs:NCName">
  100. <xs:enumeration value="default"/>
  101. <xs:enumeration value="preserve"/>
  102. </xs:restriction>
  103. </xs:simpleType>
  104. </xs:attribute>
  105. <xs:attribute name="base" type="xs:anyURI">
  106. <xs:annotation>
  107. <xs:documentation>See http://www.w3.org/TR/xmlbase/ for
  108. information about this attribute.</xs:documentation>
  109. </xs:annotation>
  110. </xs:attribute>
  111. <xs:attribute name="id" type="xs:ID">
  112. <xs:annotation>
  113. <xs:documentation>See http://www.w3.org/TR/xml-id/ for
  114. information about this attribute.</xs:documentation>
  115. </xs:annotation>
  116. </xs:attribute>
  117. <xs:attributeGroup name="specialAttrs">
  118. <xs:attribute ref="xml:base"/>
  119. <xs:attribute ref="xml:lang"/>
  120. <xs:attribute ref="xml:space"/>
  121. <xs:attribute ref="xml:id"/>
  122. </xs:attributeGroup>
  123. </xs:schema>