2 <xs:schema targetNamespace=
"http://www.w3.org/XML/1998/namespace"
3 xmlns:
xs=
"http://www.w3.org/2001/XMLSchema"
4 xmlns =
"http://www.w3.org/1999/xhtml"
10 <h1>About the XML namespace
</h1>
12 <div class=
"bodytext">
14 This schema document describes the XML namespace, in a form
15 suitable for import by other schema documents.
18 See
<a href=
"http://www.w3.org/XML/1998/namespace.html">
19 http://www.w3.org/XML/
1998/namespace.html
</a> and
20 <a href=
"http://www.w3.org/TR/REC-xml">
21 http://www.w3.org/TR/REC-xml
</a> for information
25 Note that local names in this namespace are intended to be
26 defined only by the World Wide Web Consortium or its subgroups.
27 The names currently defined in this namespace are listed below.
28 They should not be used with conflicting semantics by any Working
29 Group, specification, or document instance.
32 See further below in this document for more information about
<a
33 href=
"#usage">how to refer to this schema document from your own
34 XSD schema documents
</a> and about
<a href=
"#nsversioning">the
35 namespace-versioning policy governing this schema document
</a>.
42 <xs:attribute name=
"lang">
47 <h3>lang (as an attribute name)
</h3>
49 denotes an attribute whose value
50 is a language code for the natural language of the content of
51 any element; its value is inherited. This name is reserved
52 by virtue of its definition in the XML specification.
</p>
58 Attempting to install the relevant ISO
2- and
3-letter
59 codes as the enumerated possible values is probably never
60 going to be a realistic possibility.
63 See BCP
47 at
<a href=
"http://www.rfc-editor.org/rfc/bcp/bcp47.txt">
64 http://www.rfc-editor.org/rfc/bcp/bcp47.txt
</a>
65 and the IANA language subtag registry at
66 <a href=
"http://www.iana.org/assignments/language-subtag-registry">
67 http://www.iana.org/assignments/language-subtag-registry
</a>
68 for further information.
71 The union allows for the 'un-declaration' of xml:lang with
78 <xs:union memberTypes=
"xs:token">
80 <xs:restriction base=
"xs:string">
81 <xs:enumeration value=
""/>
88 <xs:attribute name=
"space">
93 <h3>space (as an attribute name)
</h3>
95 denotes an attribute whose
96 value is a keyword indicating what whitespace processing
97 discipline is intended for the content of the element; its
98 value is inherited. This name is reserved by virtue of its
99 definition in the XML specification.
</p>
105 <xs:restriction base=
"xs:NCName">
106 <xs:enumeration value=
"default"/>
107 <xs:enumeration value=
"preserve"/>
112 <xs:attribute name=
"base" type=
"xs:anyURI"> <xs:annotation>
116 <h3>base (as an attribute name)
</h3>
118 denotes an attribute whose value
119 provides a URI to be used as the base for interpreting any
120 relative URIs in the scope of the element on which it
121 appears; its value is inherited. This name is reserved
122 by virtue of its definition in the XML Base specification.
</p>
126 href=
"http://www.w3.org/TR/xmlbase/">http://www.w3.org/TR/xmlbase/
</a>
127 for information about this attribute.
134 <xs:attribute name=
"id" type=
"xs:ID">
139 <h3>id (as an attribute name)
</h3>
141 denotes an attribute whose value
142 should be interpreted as if declared to be of type ID.
143 This name is reserved by virtue of its definition in the
144 xml:id specification.
</p>
148 href=
"http://www.w3.org/TR/xml-id/">http://www.w3.org/TR/xml-id/
</a>
149 for information about this attribute.
156 <xs:attributeGroup name=
"specialAttrs">
157 <xs:attribute ref=
"xml:base"/>
158 <xs:attribute ref=
"xml:lang"/>
159 <xs:attribute ref=
"xml:space"/>
160 <xs:attribute ref=
"xml:id"/>
167 <h3>Father (in any context at all)
</h3>
169 <div class=
"bodytext">
171 denotes Jon Bosak, the chair of
172 the original XML Working Group. This name is reserved by
173 the following decision of the W3C XML Plenary and
174 XML Coordination groups:
178 In appreciation for his vision, leadership and
179 dedication the W3C XML Plenary on this
10th day of
180 February,
2000, reserves for Jon Bosak in perpetuity
181 the XML name
"xml:Father".
191 <div xml:
id=
"usage" id=
"usage">
192 <h2><a name=
"usage">About this schema document
</a></h2>
194 <div class=
"bodytext">
196 This schema defines attributes and an attribute group suitable
197 for use by schemas wishing to allow
<code>xml:base
</code>,
198 <code>xml:lang
</code>,
<code>xml:space
</code> or
199 <code>xml:id
</code> attributes on elements they define.
202 To enable this, such a schema must import this schema for
203 the XML namespace, e.g. as follows:
208 <import
namespace=
"http://www.w3.org/XML/1998/namespace"
209 schemaLocation=
"http://www.w3.org/2001/xml.xsd"/>
215 <import
namespace=
"http://www.w3.org/XML/1998/namespace"
216 schemaLocation=
"http://www.w3.org/2009/01/xml.xsd"/>
219 Subsequently, qualified reference to any of the attributes or the
220 group defined below will have the desired effect, e.g.
225 <attributeGroup
ref=
"xml:specialAttrs"/>
228 will define a type which will schema-validate an instance element
229 with any of those attributes.
238 <div id=
"nsversioning" xml:
id=
"nsversioning">
239 <h2><a name=
"nsversioning">Versioning policy for this schema document
</a></h2>
240 <div class=
"bodytext">
242 In keeping with the XML Schema WG's standard versioning
243 policy, this schema document will persist at
244 <a href=
"http://www.w3.org/2009/01/xml.xsd">
245 http://www.w3.org/
2009/
01/xml.xsd
</a>.
248 At the date of issue it can also be found at
249 <a href=
"http://www.w3.org/2001/xml.xsd">
250 http://www.w3.org/
2001/xml.xsd
</a>.
253 The schema document at that URI may however change in the future,
254 in order to remain compatible with the latest version of XML
255 Schema itself, or with the XML namespace itself. In other words,
256 if the XML Schema or XML namespaces change, the version of this
257 document at
<a href=
"http://www.w3.org/2001/xml.xsd">
258 http://www.w3.org/
2001/xml.xsd
260 will change accordingly; the version at
261 <a href=
"http://www.w3.org/2009/01/xml.xsd">
262 http://www.w3.org/
2009/
01/xml.xsd
267 Previous dated (and unchanging) versions of this schema
271 <li><a href=
"http://www.w3.org/2009/01/xml.xsd">
272 http://www.w3.org/
2009/
01/xml.xsd
</a></li>
273 <li><a href=
"http://www.w3.org/2007/08/xml.xsd">
274 http://www.w3.org/
2007/
08/xml.xsd
</a></li>
275 <li><a href=
"http://www.w3.org/2004/10/xml.xsd">
276 http://www.w3.org/
2004/
10/xml.xsd
</a></li>
277 <li><a href=
"http://www.w3.org/2001/03/xml.xsd">
278 http://www.w3.org/
2001/
03/xml.xsd
</a></li>