xml.xsd 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- (C) Copyright OASIS Open 2005. -->
  3. <!-- (C) Copyright IBM Corporation 2001, 2004. -->
  4. <!-- All Rights Reserved. -->
  5. <xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en">
  6. <xs:annotation>
  7. <xs:documentation>
  8. See http://www.w3.org/XML/1998/namespace.html and
  9. http://www.w3.org/TR/REC-xml for information about this namespace.
  10. </xs:documentation>
  11. </xs:annotation>
  12. <xs:annotation>
  13. <xs:documentation>This schema defines attributes and an attribute group
  14. suitable for use by
  15. schemas wishing to allow xml:base, xml:lang or xml:space attributes
  16. on elements they define.
  17. To enable this, such a schema must import this schema
  18. for the XML namespace, e.g. as follows:
  19. &lt;schema . . .>
  20. . . .
  21. &lt;import namespace="http://www.w3.org/XML/1998/namespace"
  22. schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>
  23. Subsequently, qualified reference to any of the attributes
  24. or the group defined below will have the desired effect, e.g.
  25. &lt;type . . .>
  26. . . .
  27. &lt;attributeGroup ref="xml:specialAttrs"/>
  28. will define a type which will schema-validate an instance
  29. element with any of those attributes</xs:documentation>
  30. </xs:annotation>
  31. <xs:annotation>
  32. <xs:documentation>In keeping with the XML Schema WG's standard versioning
  33. policy, this schema document will persist at
  34. http://www.w3.org/2001/03/xml.xsd.
  35. At the date of issue it can also be found at
  36. http://www.w3.org/2001/xml.xsd.
  37. The schema document at that URI may however change in the future,
  38. in order to remain compatible with the latest version of XML Schema
  39. itself. In other words, if the XML Schema namespace changes, the version
  40. of this document at
  41. http://www.w3.org/2001/xml.xsd will change
  42. accordingly; the version at
  43. http://www.w3.org/2001/03/xml.xsd will not change.
  44. </xs:documentation>
  45. </xs:annotation>
  46. <xs:attribute name="lang" type="xs:language">
  47. <xs:annotation>
  48. <xs:documentation>In due course, we should install the relevant ISO 2- and 3-letter
  49. codes as the enumerated possible values . . .</xs:documentation>
  50. </xs:annotation>
  51. </xs:attribute>
  52. <xs:attribute name="space" default="preserve">
  53. <xs:simpleType>
  54. <xs:restriction base="xs:NCName">
  55. <xs:enumeration value="default"/>
  56. <xs:enumeration value="preserve"/>
  57. </xs:restriction>
  58. </xs:simpleType>
  59. </xs:attribute>
  60. <xs:attribute name="base" type="xs:anyURI">
  61. <xs:annotation>
  62. <xs:documentation>See http://www.w3.org/TR/xmlbase/ for
  63. information about this attribute.</xs:documentation>
  64. </xs:annotation>
  65. </xs:attribute>
  66. <xs:attributeGroup name="specialAttrs">
  67. <xs:attribute ref="xml:base"/>
  68. <xs:attribute ref="xml:lang"/>
  69. <xs:attribute ref="xml:space"/>
  70. </xs:attributeGroup>
  71. </xs:schema>