xml.xsd 5.7 KB

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