xml.xsd 4.6 KB

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