You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
822 lines
47 KiB
822 lines
47 KiB
|
|
|
|
<!doctype html public '-//W3C//DTD HTML 4.0 Transitional//EN' 'http://www.w3.org/TR/REC-html40-971218/loose.dtd'><HTML><HEAD><meta name='GENERATOR' content='XML/XH/Lark'><link rel='STYLESHEET' type='text/css' href='xml.css'><TITLE>Namespaces in XML</TITLE></HEAD><BODY BGCOLOR='#ffffff'>
|
|
|
|
<H3 align='right'><A HREF='http://www.w3.org/'><IMG border='0' align='left' alt='W3C' src='http://www.w3.org/Icons/WWW/w3c_home'></A>REC-xml-names-19990114</H3><br><H1 align='center'>Namespaces in XML</H1>
|
|
|
|
<h3 align='center'>World Wide Web Consortium
|
|
14-January-1999 </h3>
|
|
<P></P>
|
|
<DL><DT>This version:</DT>
|
|
<dd><A HREF='http://www.w3.org/TR/1999/REC-xml-names-19990114'>
|
|
http://www.w3.org/TR/1999/REC-xml-names-19990114</A>
|
|
<dd><A HREF='http://www.w3.org/TR/1999/REC-xml-names-19990114/xml-names.xml'>
|
|
http://www.w3.org/TR/1999/REC-xml-names-19990114/xml-names.xml</A>
|
|
<dd><A HREF='http://www.w3.org/TR/1999/REC-xml-names-19990114/Overview.html'>
|
|
http://www.w3.org/TR/1999/REC-xml-names-19990114/Overview.html</A>
|
|
|
|
<DT>Latest version:</DT>
|
|
<dd><A HREF='http://www.w3.org/TR/REC-xml-names'>http://www.w3.org/TR/REC-xml-names</A>
|
|
|
|
<DT>Previous version:</DT>
|
|
<dd><A HREF='http://www.w3.org/TR/1998/PR-xml-names-19981117'>
|
|
http://www.w3.org/TR/1998/PR-xml-names-19981117</A>
|
|
|
|
<dt>Editors:</dt>
|
|
<DD>Tim Bray
|
|
(Textuality)
|
|
<A HREF='mailto:tbray@textuality.com'><tbray@textuality.com></A></DD>
|
|
<DD>Dave Hollander
|
|
(Hewlett-Packard Company)
|
|
<A HREF='mailto:dmh@corp.hp.com'><dmh@corp.hp.com></A></DD>
|
|
<DD>Andrew Layman
|
|
(Microsoft)
|
|
<A HREF='mailto:andrewl@microsoft.com'><andrewl@microsoft.com></A></DD>
|
|
</dl><p><small><A href='http://www.w3.org/Consortium/Legal/ipr-notice.html#Copyright'>Copyright</A> © 1999 <A href='http://www.w3.org'>W3C</A> (<A href='http://www.lcs.mit.edu'>MIT</A>, <A href='http://www.inria.fr/'>INRIA</A>, <A href='http://www.keio.ac.jp/'>Keio</A> ), All Rights Reserved. W3C <A href='http://www.w3.org/Consortium/Legal/ipr-notice.html#Legal Disclaimer'>liability,</A> <A href='http://www.w3.org/Consortium/Legal/ipr-notice.html#W3C Trademarks'>trademark</A>, <A href='http://www.w3.org/Consortium/Legal/copyright-documents.html'>document use </A>and <A href='http://www.w3.org/Consortium/Legal/copyright-software.html'>software licensing </A>rules apply.</small></p>
|
|
<h2>Status of this document</h2>
|
|
<P>This document has been reviewed by W3C Members and
|
|
other interested parties and has been endorsed by the
|
|
Director as a W3C Recommendation. It is a stable
|
|
document and may be used as reference material or cited
|
|
as a normative reference from another document. W3C's
|
|
role in making the Recommendation is to draw attention
|
|
to the specification and to promote its widespread
|
|
deployment. This enhances the functionality and
|
|
interoperability of the Web.</P>
|
|
<P>The list of known errors in this specification is
|
|
available at
|
|
<A HREF='http://www.w3.org/XML/xml-names-19990114-errata'>http://www.w3.org/XML/xml-names-19990114-errata</A>.</P>
|
|
<P>Please report errors in this document to
|
|
<A HREF='mailto:xml-names-editor@w3.org'>xml-names-editor@w3.org</A>.
|
|
</P>
|
|
|
|
<H2>Abstract</H2>
|
|
<P>XML namespaces provide a simple method for qualifying
|
|
element and attribute
|
|
names used in Extensible Markup Language documents by associating them
|
|
with namespaces identified by URI references.</P>
|
|
|
|
|
|
|
|
|
|
<h2><a name='XML-TOC'>Table of Contents</a></h2>
|
|
<dl>
|
|
<dd><dl>
|
|
<dt>1. <A HREF='#sec-intro'>Motivation and Summary</A>
|
|
<dd>1.1 <A HREF='#notation'>A Note on Notation and Usage</A>
|
|
<dt>2. <A HREF='#ns-decl'>Declaring Namespaces</A><BR>
|
|
<dt>3. <A HREF='#ns-qualnames'>Qualified Names</A><BR>
|
|
<dt>4. <A HREF='#ns-using'>Using Qualified Names</A><BR>
|
|
<dt>5. <A HREF='#scoping-defaulting'>Applying Namespaces to Elements and Attributes</A><BR>
|
|
<dd>5.1 <A HREF='#scoping'>Namespace Scoping</A><BR>
|
|
<dd>5.2 <A HREF='#defaulting'>Namespace Defaulting</A><BR>
|
|
<dd>5.3 <A HREF='#uniqAttrs'>Uniqueness of Attributes</A><BR>
|
|
<dt>6. <A HREF='#Conformance'>Conformance of Documents</A><BR>
|
|
</dl>
|
|
</dl>
|
|
<h3>Appendices</h3>
|
|
<dl>
|
|
<dd><dl>
|
|
<dt>A. <A HREF='#Philosophy'>The Internal Structure of XML Namespaces (Non-Normative)</A><BR>
|
|
<dd>A.1 <A HREF='#sets-no-good'>The Insufficiency of the Traditional Namespace</A><BR>
|
|
<dd>A.2 <A HREF='#ns-breakdown'>XML Namespace Partitions</A><BR>
|
|
<dd>A.3 <A HREF='#ns-expnames'>Expanded Element Types and Attribute Names</A><BR>
|
|
<dd>A.4 <A HREF='#check-uniqattr'>Unique Expanded Attribute Names</A><BR>
|
|
<dt>B. <A HREF='#sec-xml-and-sgml'>Acknowledgements (Non-Normative)</A><BR>
|
|
<dt>C. <A HREF='#refs'>References</A><BR>
|
|
</dl>
|
|
</dl>
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<H2><A NAME='sec-intro'>1. Motivation and Summary</a></h2>
|
|
<P>We envision applications of Extensible Markup Language (XML) where
|
|
a single XML document may
|
|
contain elements and attributes
|
|
(here referred to as a "markup vocabulary")
|
|
that are defined for and used by multiple software modules.
|
|
One motivation for this is modularity; if such a markup vocabulary exists
|
|
which is well-understood and for which there is useful software
|
|
available, it is better to re-use this markup rather than re-invent it.
|
|
</P>
|
|
<P>Such documents, containing multiple markup vocabularies,
|
|
pose problems of recognition and collision. Software modules need to
|
|
be able to recognize the tags and attributes which they are designed
|
|
to process, even in the face
|
|
of "collisions" occurring when markup intended for some other software
|
|
package uses the same element type or attribute name.
|
|
</P>
|
|
|
|
<P>These considerations require that document
|
|
constructs
|
|
should have universal names,
|
|
whose scope extends beyond their
|
|
containing document.
|
|
This specification describes a mechanism,
|
|
<EM>XML namespaces</EM>, which accomplishes this.</P>
|
|
|
|
<P><a name='dt-namespace'></a><span class='TStart'>[Definition:] An <b>XML namespace</b>
|
|
is a collection of names, identified by a URI reference
|
|
<A href='#URIRef'>[RFC2396]</A>,
|
|
which are used in XML documents as
|
|
<A HREF='http://www.w3.org/TR/REC-xml#dt-stag'>element types</A>
|
|
and <A HREF='http://www.w3.org/TR/REC-xml#dt-attrname'>attribute names</A>.
|
|
</span>
|
|
XML namespaces
|
|
differ from the "namespaces" conventionally used in computing disciplines
|
|
in that the XML version has internal structure and is not, mathematically
|
|
speaking, a set.
|
|
These issues are discussed in
|
|
"<A href='#Philosophy'>A. The Internal Structure of XML Namespaces</A>".
|
|
</P>
|
|
<P><a name='dt-identical'></a><span class='TStart'>[Definition:] URI references which
|
|
identify namespaces are considered <b>identical</b> when they are
|
|
exactly the same character-for-character.</span>
|
|
Note that URI references which are not identical in this sense may in fact be
|
|
functionally equivalent.
|
|
Examples include URI references which differ only in case, or which are in
|
|
external entities which have different effective base URIs.
|
|
</P>
|
|
|
|
<P>Names from XML namespaces may appear as
|
|
<A href='#dt-qname'>qualified names</A>,
|
|
which contain a single colon, separating the name into a
|
|
<A href='#dt-prefix'>namespace prefix</A> and a
|
|
<A href='#dt-localname'>local part</A>.
|
|
The prefix, which is mapped to a URI reference, selects a namespace.
|
|
The combination of
|
|
the universally managed URI namespace and the document's own namespace
|
|
produces identifiers that are universally unique.
|
|
Mechanisms are provided for prefix scoping and defaulting.
|
|
</P>
|
|
|
|
<P>URI references can contain characters not allowed in names, so cannot
|
|
be used directly as namespace prefixes.
|
|
Therefore, the
|
|
namespace prefix serves as a proxy for a URI reference.
|
|
An attribute-based syntax described below is used
|
|
to <A href='#dt-NSDecl'>declare</A> the association of the
|
|
namespace prefix with a URI reference;
|
|
software which supports this namespace proposal must
|
|
recognize and act on these declarations and prefixes.
|
|
</P>
|
|
|
|
|
|
<H3><A NAME='notation'>1.1 A Note on Notation and Usage</a></h3>
|
|
<P>Note that many of the
|
|
nonterminals in the productions in
|
|
this specification are defined not here but in
|
|
the XML specification <A href='#XML'>[XML]</A>.
|
|
When nonterminals defined here have the same names as nonterminals
|
|
defined in the XML specification, the productions here
|
|
in all cases match a subset of the strings matched by the
|
|
corresponding ones there.
|
|
</P>
|
|
<P>In this document's productions,
|
|
the <CODE>NSC</CODE> is a "Namespace Constraint",
|
|
one of the rules that documents conforming to this specification must follow.
|
|
</P>
|
|
<P>Note that all Internet domain names used in
|
|
examples, with the exception of <CODE>w3.org</CODE>, are selected
|
|
at random and should not be taken as having any import.</P>
|
|
|
|
|
|
|
|
|
|
<H2><A NAME='ns-decl'>2. Declaring Namespaces</a></h2>
|
|
<P><a name='dt-NSDecl'></a><span class='TStart'>[Definition:] A namespace is
|
|
<b>declared</b> using
|
|
a family of reserved attributes.
|
|
Such an attribute's name must either
|
|
be <code>xmlns</code> or have <code>xmlns:</code> as a prefix.
|
|
These attributes, like any other XML attributes, may be provided
|
|
directly or by <A HREF='http://www.w3.org/TR/REC-xml#dt-default'>default</A>.
|
|
</span>
|
|
</P>
|
|
|
|
<table cellpadding='5' border='1' bgcolor='#f5dcb3' width='100%'><tr align='left'><td><strong>
|
|
Attribute Names for Namespace Declaration</strong></td></tr><tr><td>
|
|
<table border='0' bgcolor='#f5dcb3'>
|
|
|
|
<tr valign='top'><td align='right'><a name='NT-NSAttName'></a>[1] </td><td align='right'><font><code>NSAttName</code></font></td>
|
|
<td align='center'><font><code> ::= </code></font></td><td align='left'><font><code><a href='#NT-PrefixedAttName'>PrefixedAttName</A></code></font></td>
|
|
</tr><tr valign='top'><td align='right'></td><td></td><td></td><td align='left'><font><code>| <a href='#NT-DefaultAttName'>DefaultAttName</A></code></font></td></tr>
|
|
<tr valign='top'><td align='right'><a name='NT-PrefixedAttName'></a>[2] </td><td align='right'><font><code>PrefixedAttName</code></font></td>
|
|
<td align='center'><font><code> ::= </code></font></td><td align='left'><font><code>'xmlns:' <a href='#NT-NCName'>NCName</A></code></font></td>
|
|
<td align='center'><font><code> [ </code></font></td><td align='left'><font><code>NSC: <a href='#xmlReserved'>Leading "XML"</A> ]</code></font></td>
|
|
</tr>
|
|
<tr valign='top'><td align='right'><a name='NT-DefaultAttName'></a>[3] </td><td align='right'><font><code>DefaultAttName</code></font></td>
|
|
<td align='center'><font><code> ::= </code></font></td><td align='left'><font><code>'xmlns'</code></font></td></tr>
|
|
<tr valign='top'><td align='right'><a name='NT-NCName'></a>[4] </td><td align='right'><font><code>NCName</code></font></td>
|
|
<td align='center'><font><code> ::= </code></font></td><td align='left'><font><code>(<a href='http://www.w3.org/TR/REC-xml#NT-Letter'>Letter</A> | '_')
|
|
(<a href='#NT-NCNameChar'>NCNameChar</A>)*</code></font></td><td align='center'><font><code> /* </code></font></td><td align='left'><font><code>An XML
|
|
<a href='http://www.w3.org/TR/REC-xml#NT-Name'>Name</A>, minus the ":" */</code></font></td></tr>
|
|
<tr valign='top'><td align='right'><a name='NT-NCNameChar'></a>[5] </td><td align='right'><font><code>NCNameChar</code></font></td>
|
|
<td align='center'><font><code> ::= </code></font></td><td align='left'><font><code><a href='http://www.w3.org/TR/REC-xml#NT-Letter'>Letter</A>
|
|
| <a href='http://www.w3.org/TR/REC-xml#NT-Digit'>Digit</A>
|
|
| '.' | '-' | '_'
|
|
| <a href='http://www.w3.org/TR/REC-xml#NT-CombiningChar'>CombiningChar</A>
|
|
| <a href='http://www.w3.org/TR/REC-xml#NT-Extender'>Extender</A></code></font></td>
|
|
</tr>
|
|
</table>
|
|
</td></tr></table>
|
|
|
|
|
|
<P>
|
|
<a name='dt-NSName'></a><span class='TStart'>[Definition:] The attribute's
|
|
<A HREF='http://www.w3.org/TR/REC-xml#dt-attrval'>value</A>,
|
|
a URI reference,
|
|
is the <b>namespace name</b> identifying the namespace.</span>
|
|
The namespace name, to serve its
|
|
intended purpose, should have the characteristics of uniqueness and
|
|
persistence.
|
|
It is not a goal that it be directly usable for retrieval of a schema (if
|
|
any exists).
|
|
An example of a syntax that is designed with these goals in mind is
|
|
that for Uniform Resource Names <A href='#URNs'>[RFC2141]</A>.
|
|
However, it should be noted that ordinary URLs can be managed in such a way as
|
|
to achieve these same goals.</P>
|
|
|
|
<P>
|
|
<a name='dt-prefix'></a><span class='TStart'>[Definition:] If the
|
|
attribute name matches <code><a href='#NT-PrefixedAttName'>PrefixedAttName</A></code>,
|
|
then the
|
|
<code><a href='#NT-NCName'>NCName</A></code> gives the <b>namespace prefix</b>,
|
|
used to associate element and attribute names with the
|
|
<A href='#dt-NSName'>namespace name</A> in the attribute value
|
|
in the scope of the element to which the declaration
|
|
is attached.</span>
|
|
In such declarations, the namespace name may not be empty.</P>
|
|
|
|
<P><a name='dt-defaultNS'></a><span class='TStart'>[Definition:] If the
|
|
attribute name matches <code><a href='#NT-DefaultAttName'>DefaultAttName</A></code>,
|
|
then the
|
|
<A href='#dt-NSName'>namespace name</A> in the
|
|
attribute value is
|
|
that of the <b>default namespace</b>
|
|
in the scope of the element to which the declaration
|
|
is attached.</span>
|
|
|
|
In such a default declaration, the attribute value may be empty.
|
|
Default namespaces and overriding of declarations are discussed in
|
|
"<A href='#scoping-defaulting'>5. Applying Namespaces to Elements and Attributes</A>".
|
|
</P>
|
|
|
|
|
|
<P>An example namespace declaration, which associates the
|
|
namespace prefix <code>edi</code> with the namespace name
|
|
<CODE>http://ecommerce.org/schema</CODE>:
|
|
</p><table cellpadding='5' border='1' bgcolor='#80ffff' width='100%'><tr><td><code><font><x xmlns:edi='http://ecommerce.org/schema'><BR> <!-- the "edi" prefix is bound to http://ecommerce.org/schema<BR> for the "x" element and contents --><BR></x></font></code></td></tr></table><p>
|
|
</P>
|
|
|
|
|
|
|
|
<A NAME='xmlReserved'></A><P><b>Namespace Constraint:
|
|
Leading "XML"</b><br>
|
|
Prefixes beginning with the three-letter sequence <CODE>x</CODE>,
|
|
<CODE>m</CODE>, <CODE>l</CODE>, in any case combination, are reserved
|
|
for use by XML and XML-related specifications.
|
|
</P>
|
|
|
|
|
|
|
|
|
|
|
|
<H2><A NAME='ns-qualnames'>3. Qualified Names</a></h2>
|
|
<P><a name='dt-qname'></a><span class='TStart'>[Definition:] In XML
|
|
documents conforming to this specification, some
|
|
names (constructs corresponding to the nonterminal
|
|
<code><a href='http://www.w3.org/TR/REC-xml#NT-Name'>Name</a></code>)
|
|
may be given as <b>qualified names</b>, defined as follows:
|
|
</span></p>
|
|
<table cellpadding='5' border='1' bgcolor='#f5dcb3' width='100%'><tr align='left'><td><strong>
|
|
Qualified Name</strong></td></tr><tr><td>
|
|
<table border='0' bgcolor='#f5dcb3'>
|
|
<tr valign='top'><td align='right'><a name='NT-QName'></a>[6] </td><td align='right'><font><code>QName</code></font></td>
|
|
<td align='center'><font><code> ::= </code></font></td><td align='left'><font><code>
|
|
(<a href='#NT-Prefix'>Prefix</A> ':')?
|
|
<a href='#NT-LocalPart'>LocalPart</A></code></font></td></tr>
|
|
<tr valign='top'><td align='right'><a name='NT-Prefix'></a>[7] </td><td align='right'><font><code>Prefix</code></font></td>
|
|
<td align='center'><font><code> ::= </code></font></td><td align='left'><font><code><a href='#NT-NCName'>NCName</A></code></font></td></tr>
|
|
<tr valign='top'><td align='right'><a name='NT-LocalPart'></a>[8] </td><td align='right'><font><code>LocalPart</code></font></td>
|
|
<td align='center'><font><code> ::= </code></font></td><td align='left'><font><code><a href='#NT-NCName'>NCName</A></code></font></td>
|
|
</tr>
|
|
|
|
</table>
|
|
</td></tr></table>
|
|
<p>
|
|
The
|
|
<code><a href='#NT-Prefix'>Prefix</A></code> provides the
|
|
<A href='#dt-prefix'>namespace prefix</A>
|
|
part of the qualified name, and must be associated with a namespace URI
|
|
reference in a
|
|
<A href='#dt-NSDecl'>namespace declaration</A>.
|
|
<a name='dt-localname'></a><span class='TStart'>[Definition:]
|
|
The <code><a href='#NT-LocalPart'>LocalPart</A></code> provides the
|
|
<b>local part</b> of the qualified name.</span>
|
|
</P>
|
|
<P>Note that the prefix functions <EM>only</EM> as a placeholder for a
|
|
namespace name.
|
|
Applications should use the namespace name, not the prefix, in constructing
|
|
names whose scope extends beyond the
|
|
containing document.</P>
|
|
|
|
|
|
|
|
<H2><A NAME='ns-using'>4. Using Qualified Names</a></h2>
|
|
<P>In XML documents conforming to this specification,
|
|
element types are given as
|
|
<A href='#dt-qname'>qualified names</A>, as
|
|
follows:
|
|
</p>
|
|
<table cellpadding='5' border='1' bgcolor='#f5dcb3' width='100%'><tr align='left'><td><strong>
|
|
Element Types</strong></td></tr><tr><td>
|
|
<table border='0' bgcolor='#f5dcb3'>
|
|
<tr valign='top'><td align='right'><a name='NT-STag'></a>[9] </td><td align='right'><font><code>STag</code></font></td>
|
|
<td align='center'><font><code> ::= </code></font></td><td align='left'><font><code>'<' <a href='#NT-QName'>QName</A>
|
|
(<a href='http://www.w3.org/TR/REC-xml#NT-S'>S</A>
|
|
<a href='http://www.w3.org/TR/REC-xml#NT-Attribute'>Attribute</A>)*
|
|
<a href='http://www.w3.org/TR/REC-xml#NT-S'>S</A>? '>'
|
|
</code></font></td><td align='center'><font><code> [ </code></font></td><td align='left'><font><code>NSC: <a href='#nsc-NSDeclared'>Prefix Declared</A> ]</code></font></td>
|
|
</tr>
|
|
<tr valign='top'><td align='right'><a name='NT-ETag'></a>[10] </td><td align='right'><font><code>ETag</code></font></td>
|
|
<td align='center'><font><code> ::= </code></font></td><td align='left'><font><code>'</' <a href='#NT-QName'>QName</A>
|
|
<a href='http://www.w3.org/TR/REC-xml#NT-S'>S</A>? '>'</code></font></td>
|
|
<td align='center'><font><code> [ </code></font></td><td align='left'><font><code>NSC: <a href='#nsc-NSDeclared'>Prefix Declared</A> ]</code></font></td></tr>
|
|
<tr valign='top'><td align='right'><a name='NT-EmptyElemTag'></a>[11] </td><td align='right'><font><code>EmptyElemTag</code></font></td>
|
|
<td align='center'><font><code> ::= </code></font></td><td align='left'><font><code>'<' <a href='#NT-QName'>QName</A>
|
|
(<a href='http://www.w3.org/TR/REC-xml#NT-S'>S</A>
|
|
<a href='http://www.w3.org/TR/REC-xml#NT-Attribute'>Attribute</A>)*
|
|
<a href='http://www.w3.org/TR/REC-xml#NT-S'>S</A>? '/>'</code></font></td>
|
|
<td align='center'><font><code> [ </code></font></td><td align='left'><font><code>NSC: <a href='#nsc-NSDeclared'>Prefix Declared</A> ]</code></font></td></tr>
|
|
</table>
|
|
</td></tr></table>
|
|
<p>
|
|
</P>
|
|
<P>An example of a qualified name serving as an element type:
|
|
</p><table cellpadding='5' border='1' bgcolor='#80ffff' width='100%'><tr><td><code><font><x xmlns:edi='http://ecommerce.org/schema'><BR> <!-- the 'price' element's namespace is http://ecommerce.org/schema --><BR> <edi:price units='Euro'>32.18</edi:price><BR></x></font></code></td></tr></table><p>
|
|
</P>
|
|
|
|
<P>
|
|
Attributes are either <A href='#dt-NSDecl'>namespace
|
|
declarations</A>
|
|
or their names are given as
|
|
<A href='#dt-qname'>qualified names</A>:
|
|
</p>
|
|
<table cellpadding='5' border='1' bgcolor='#f5dcb3' width='100%'><tr align='left'><td><strong>
|
|
Attribute</strong></td></tr><tr><td>
|
|
<table border='0' bgcolor='#f5dcb3'>
|
|
<tr valign='top'><td align='right'><a name='NT-Attribute'></a>[12] </td><td align='right'><font><code>Attribute</code></font></td>
|
|
<td align='center'><font><code> ::= </code></font></td><td align='left'><font><code><a href='#NT-NSAttName'>NSAttName</A>
|
|
<a href='http://www.w3.org/TR/REC-xml#NT-Eq'>Eq</A>
|
|
<a href='http://www.w3.org/TR/REC-xml#NT-AttValue'>AttValue</A></code></font></td>
|
|
</tr><tr valign='top'><td align='right'></td><td></td><td></td><td align='left'><font><code>| <a href='#NT-QName'>QName</A> <a href='http://www.w3.org/TR/REC-xml#NT-Eq'>Eq</A>
|
|
<a href='http://www.w3.org/TR/REC-xml#NT-AttValue'>AttValue</A></code></font></td>
|
|
<td align='center'><font><code> [ </code></font></td><td align='left'><font><code>NSC: <a href='#nsc-NSDeclared'>Prefix Declared</A> ]</code></font></td></tr>
|
|
</table>
|
|
</td></tr></table>
|
|
<p>
|
|
</P>
|
|
<P>An example of a qualified name serving as an attribute name:
|
|
</p><table cellpadding='5' border='1' bgcolor='#80ffff' width='100%'><tr><td><code><font><x xmlns:edi='http://ecommerce.org/schema'><BR> <!-- the 'taxClass' attribute's namespace is http://ecommerce.org/schema --><BR> <lineItem edi:taxClass="exempt">Baby food</lineItem><BR></x></font></code></td></tr></table><p>
|
|
</P>
|
|
<A NAME='nsc-NSDeclared'></A><P><b>Namespace Constraint:
|
|
Prefix Declared</b><br>
|
|
The namespace prefix, unless it is <CODE>xml</CODE>
|
|
or <CODE>xmlns</CODE>, must have been
|
|
declared in a <A href='#dt-NSDecl'>namespace declaration</A>
|
|
attribute in either the start-tag of the element where the prefix
|
|
is used or in an an ancestor element (i.e. an element in whose
|
|
<A HREF='http://www.w3.org/TR/REC-xml#dt-content'>content</A> the
|
|
prefixed markup occurs).
|
|
The prefix <CODE>xml</CODE> is by definition bound to the
|
|
namespace name <CODE>http://www.w3.org/XML/1998/namespace</CODE>.
|
|
The prefix <CODE>xmlns</CODE> is used only for namespace bindings
|
|
and is not itself bound to any namespace name.
|
|
</P>
|
|
<P>This constraint may lead to operational difficulties in the case where
|
|
the namespace declaration attribute is provided, not directly in the XML
|
|
<A HREF='http://www.w3.org/TR/REC-xml#dt-docent'>document entity</A>, but
|
|
via a default attribute declared in an external entity.
|
|
Such declarations may not be read by software which is based on a
|
|
non-validating XML processor.
|
|
Many XML applications, presumably including namespace-sensitive ones, fail to
|
|
require validating processors.
|
|
For correct operation with such applications, namespace declarations must be
|
|
provided either directly or via default attributes declared in the
|
|
<A HREF='http://www.w3.org/TR/REC-xml#dt-doctype'>internal subset of the DTD</A>.
|
|
</P>
|
|
<P>Element names and attribute types are also given as qualified names when
|
|
they appear in declarations in the
|
|
<A HREF='http://www.w3.org/TR/REC-xml#dt-dtd'>DTD</A>:
|
|
</p>
|
|
<table cellpadding='5' border='1' bgcolor='#f5dcb3' width='100%'><tr align='left'><td><strong>
|
|
Qualified Names in Declarations</strong></td></tr><tr><td>
|
|
<table border='0' bgcolor='#f5dcb3'>
|
|
<tr valign='top'><td align='right'><a name='NT-doctypedecl'></a>[13] </td><td align='right'><font><code>doctypedecl</code></font></td>
|
|
<td align='center'><font><code> ::= </code></font></td><td align='left'><font><code>'<!DOCTYPE' <a href='http://www.w3.org/TR/REC-xml#NT-S'>S</A>
|
|
<a href='#NT-QName'>QName</A> (<a href='http://www.w3.org/TR/REC-xml#NT-S'>S</A>
|
|
<a href='http://www.w3.org/TR/REC-xml#NT-ExternalID'>ExternalID</A>)?
|
|
<a href='http://www.w3.org/TR/REC-xml#NT-S'>S</A>? ('['
|
|
(<a href='http://www.w3.org/TR/REC-xml#NT-markupdecl'>markupdecl</A>
|
|
| <a href='http://www.w3.org/TR/REC-xml#NT-PEReference'>PEReference</A>
|
|
| <a href='http://www.w3.org/TR/REC-xml#NT-S'>S</A>)*
|
|
']'
|
|
<a href='http://www.w3.org/TR/REC-xml#NT-S'>S</A>?)? '>'</code></font></td>
|
|
</tr>
|
|
|
|
<tr valign='top'><td align='right'><a name='NT-elementdecl'></a>[14] </td><td align='right'><font><code>elementdecl</code></font></td>
|
|
<td align='center'><font><code> ::= </code></font></td><td align='left'><font><code>'<!ELEMENT' <a href='http://www.w3.org/TR/REC-xml#NT-S'>S</A>
|
|
<a href='#NT-QName'>QName</A>
|
|
<a href='http://www.w3.org/TR/REC-xml#NT-S'>S</A>
|
|
<a href='http://www.w3.org/TR/REC-xml#NT-contentspec'>contentspec</A>
|
|
<a href='http://www.w3.org/TR/REC-xml#NT-S'>S</A>? '>'</code></font></td>
|
|
</tr>
|
|
<tr valign='top'><td align='right'><a name='NT-cp'></a>[15] </td><td align='right'><font><code>cp</code></font></td>
|
|
<td align='center'><font><code> ::= </code></font></td><td align='left'><font><code>(<a href='#NT-QName'>QName</A>
|
|
| <a href='http://www.w3.org/TR/REC-xml#NT-choice'>choice</A>
|
|
| <a href='http://www.w3.org/TR/REC-xml#NT-seq'>seq</A>)
|
|
('?' | '*' | '+')?</code></font></td></tr>
|
|
<tr valign='top'><td align='right'><a name='NT-Mixed'></a>[16] </td><td align='right'><font><code>Mixed</code></font></td>
|
|
<td align='center'><font><code> ::= </code></font></td><td align='left'><font><code>'(' <a href='http://www.w3.org/TR/REC-xml#NT-S'>S</A>?
|
|
'#PCDATA'
|
|
(<a href='http://www.w3.org/TR/REC-xml#NT-S'>S</A>?
|
|
'|'
|
|
<a href='http://www.w3.org/TR/REC-xml#NT-S'>S</A>?
|
|
<a href='#NT-QName'>QName</A>)*
|
|
<a href='http://www.w3.org/TR/REC-xml#NT-S'>S</A>?
|
|
')*' </code></font></td>
|
|
</tr><tr valign='top'><td align='right'></td><td></td><td></td><td align='left'><font><code>| '(' <a href='http://www.w3.org/TR/REC-xml#NT-S'>S</A>? '#PCDATA' <a href='http://www.w3.org/TR/REC-xml#NT-S'>S</A>? ')'
|
|
</code></font></td>
|
|
</tr>
|
|
<tr valign='top'><td align='right'><a name='NT-AttlistDecl'></a>[17] </td><td align='right'><font><code>AttlistDecl</code></font></td>
|
|
<td align='center'><font><code> ::= </code></font></td><td align='left'><font><code>'<!ATTLIST' <a href='http://www.w3.org/TR/REC-xml#NT-S'>S</A>
|
|
<a href='#NT-QName'>QName</A>
|
|
<a href='#NT-AttDef'>AttDef</A>*
|
|
<a href='http://www.w3.org/TR/REC-xml#NT-S'>S</A>? '>'</code></font></td>
|
|
</tr>
|
|
<tr valign='top'><td align='right'><a name='NT-AttDef'></a>[18] </td><td align='right'><font><code>AttDef</code></font></td>
|
|
<td align='center'><font><code> ::= </code></font></td><td align='left'><font><code><a href='http://www.w3.org/TR/REC-xml#NT-S'>S</A>
|
|
(<a href='#NT-QName'>QName</A> | <a href='#NT-NSAttName'>NSAttName</A>)
|
|
<a href='http://www.w3.org/TR/REC-xml#NT-S'>S</A> <a href='http://www.w3.org/TR/REC-xml#NT-AttType'>AttType</A>
|
|
<a href='http://www.w3.org/TR/REC-xml#NT-S'>S</A> <a href='http://www.w3.org/TR/REC-xml#NT-DefaultDecl'>DefaultDecl</A></code></font></td>
|
|
</tr>
|
|
</table>
|
|
</td></tr></table>
|
|
<p>
|
|
</P>
|
|
|
|
|
|
|
|
|
|
|
|
<H2><A NAME='scoping-defaulting'>5. Applying Namespaces to Elements and Attributes</a></h2>
|
|
|
|
|
|
<H3><A NAME='scoping'>5.1 Namespace Scoping</a></h3>
|
|
<P>The namespace declaration is considered to apply to the
|
|
element where it is specified and to all elements within the content
|
|
of that element, unless overridden by another namespace declaration
|
|
with the same <code><a href='#NT-NSAttName'>NSAttName</A></code> part:
|
|
</p><table cellpadding='5' border='1' bgcolor='#80ffff' width='100%'><tr><td><code><font><?xml version="1.0"?><BR><!-- all elements here are explicitly in the HTML namespace --><BR><html:html xmlns:html='http://www.w3.org/TR/REC-html40'><BR> <html:head><html:title>Frobnostication</html:title></html:head><BR> <html:body><html:p>Moved to <BR> <html:a href='http://frob.com'>here.</html:a></html:p></html:body><BR></html:html></font></code></td></tr></table><p>
|
|
</P>
|
|
<P>Multiple namespace prefixes can be declared as attributes of a single element,
|
|
as shown in this example:
|
|
</p><table cellpadding='5' border='1' bgcolor='#80ffff' width='100%'><tr><td><code><font><?xml version="1.0"?><BR><!-- both namespace prefixes are available throughout --><BR><bk:book xmlns:bk='urn:loc.gov:books'<BR> xmlns:isbn='urn:ISBN:0-395-36341-6'><BR> <bk:title>Cheaper by the Dozen</bk:title><BR> <isbn:number>1568491379</isbn:number><BR></bk:book></font></code></td></tr></table><p>
|
|
</P>
|
|
|
|
|
|
|
|
<H3><A NAME='defaulting'>5.2 Namespace Defaulting</a></h3>
|
|
<P>A <A href='#dt-defaultNS'>default namespace</A> is considered
|
|
to apply to the element where it is declared (if that element has no
|
|
<A href='#dt-prefix'>namespace prefix</A>), and to all elements
|
|
with no prefix within the content of that
|
|
element.
|
|
If the URI reference in a default namespace declaration is empty, then
|
|
unprefixed
|
|
elements in the scope of the declaration are not considered to be in
|
|
any namespace.
|
|
Note that default namespaces do not apply directly to attributes.
|
|
|
|
</p><table cellpadding='5' border='1' bgcolor='#80ffff' width='100%'><tr><td><code><font><?xml version="1.0"?><BR><!-- elements are in the HTML namespace, in this case by default --><BR><html xmlns='http://www.w3.org/TR/REC-html40'><BR> <head><title>Frobnostication</title></head><BR> <body><p>Moved to <BR> <a href='http://frob.com'>here</a>.</p></body><BR></html></font></code></td></tr></table><p>
|
|
</p><table cellpadding='5' border='1' bgcolor='#80ffff' width='100%'><tr><td><code><font><?xml version="1.0"?><BR><!-- unprefixed element types are from "books" --><BR><book xmlns='urn:loc.gov:books'<BR> xmlns:isbn='urn:ISBN:0-395-36341-6'><BR> <title>Cheaper by the Dozen</title><BR> <isbn:number>1568491379</isbn:number><BR></book></font></code></td></tr></table><p>
|
|
</P>
|
|
<P>A larger example of namespace scoping:
|
|
</p><table cellpadding='5' border='1' bgcolor='#80ffff' width='100%'><tr><td><code><font><?xml version="1.0"?><BR><!-- initially, the default namespace is "books" --><BR><book xmlns='urn:loc.gov:books'<BR> xmlns:isbn='urn:ISBN:0-395-36341-6'><BR> <title>Cheaper by the Dozen</title><BR> <isbn:number>1568491379</isbn:number><BR> <notes><BR> <!-- make HTML the default namespace for some commentary --><BR> <p xmlns='urn:w3-org-ns:HTML'><BR> This is a <i>funny</i> book!<BR> </p><BR> </notes><BR></book></font></code></td></tr></table><p>
|
|
</P>
|
|
<P>The default namespace can be set to the empty string.
|
|
This has the same
|
|
effect, within the scope of the declaration, of there being no default
|
|
namespace.
|
|
</p><table cellpadding='5' border='1' bgcolor='#80ffff' width='100%'><tr><td><code><font><?xml version='1.0'?><BR><Beers><BR> <!-- the default namespace is now that of HTML --><BR> <table xmlns='http://www.w3.org/TR/REC-html40'><BR> <th><td>Name</td><td>Origin</td><td>Description</td></th><BR> <tr> <BR> <!-- no default namespace inside table cells --><BR> <td><brandName xmlns="">Huntsman</brandName></td><BR> <td><origin xmlns="">Bath, UK</origin></td><BR> <td><BR> <details xmlns=""><class>Bitter</class><hop>Fuggles</hop><BR> <pro>Wonderful hop, light alcohol, good summer beer</pro><BR> <con>Fragile; excessive variance pub to pub</con><BR> </details><BR> </td><BR> </tr><BR> </table><BR> </Beers></font></code></td></tr></table><p>
|
|
</P>
|
|
|
|
|
|
|
|
<H3><A NAME='uniqAttrs'>5.3 Uniqueness of Attributes</a></h3>
|
|
<P>In XML documents conforming
|
|
to this specification, no tag
|
|
may contain two attributes which:
|
|
<OL><LI>have identical names, or</LI>
|
|
<LI>have qualified names with the same
|
|
<A href='#dt-localname'>local part</A> and with
|
|
<A href='#dt-prefix'>prefixes</A> which have been bound
|
|
to <A href='#dt-NSName'>namespace names</A> that
|
|
are <A href='#dt-identical'>identical</A>.
|
|
|
|
</LI>
|
|
</OL>
|
|
|
|
|
|
<P>For example, each of the <CODE>bad</CODE> start-tags is illegal in the
|
|
following:
|
|
</p><table cellpadding='5' border='1' bgcolor='#80ffff' width='100%'><tr><td><code><font><!-- http://www.w3.org is bound to n1 and n2 --><BR><x xmlns:n1="http://www.w3.org" <BR> xmlns:n2="http://www.w3.org" ><BR> <bad a="1" a="2" /><BR> <bad n1:a="1" n2:a="2" /><BR></x></font></code></td></tr></table><p>
|
|
However, each of the following is legal, the second because the default
|
|
namespace does not apply to attribute names:
|
|
</p><table cellpadding='5' border='1' bgcolor='#80ffff' width='100%'><tr><td><code><font><!-- http://www.w3.org is bound to n1 and is the default --><BR><x xmlns:n1="http://www.w3.org" <BR> xmlns="http://www.w3.org" ><BR> <good a="1" b="2" /><BR> <good a="1" n1:a="2" /><BR></x></font></code></td></tr></table><p>
|
|
</P>
|
|
|
|
|
|
|
|
|
|
|
|
<H2><A NAME='Conformance'>6. Conformance of Documents</a></h2>
|
|
<P>In XML documents which conform to this specification,
|
|
element types and attribute names must match the production for
|
|
<code><a href='#NT-QName'>QName</A></code> and
|
|
must satisfy the "Namespace Constraints".</P>
|
|
<P>An XML document conforms to this specification if all other
|
|
tokens in the document which are required, for XML conformance, to match the
|
|
XML production for <code><a href='http://www.w3.org/TR/REC-xml#NT-Name'>Name</A></code>, match
|
|
this specification's production for <code><a href='#NT-NCName'>NCName</A></code>.
|
|
</P>
|
|
<P>The effect of conformance is that in such a document:
|
|
<UL><LI>All element types and attribute names contain either zero
|
|
or one colon.</LI>
|
|
<LI>No entity names, PI targets, or notation names contain any colons.
|
|
</LI>
|
|
</UL>
|
|
|
|
<P>Strictly speaking, attribute values declared to be of types
|
|
<code>ID</code>, <code>IDREF(S)</code>, <code>ENTITY(IES)</code>,
|
|
and <code>NOTATION</code> are also <code><a href='http://www.w3.org/TR/REC-xml#NT-Name'>Names</A></code>,
|
|
and thus should be colon-free.
|
|
However, the declared type of attribute values is only available
|
|
to processors which read markup declarations, for example
|
|
<A HREF='http://www.w3.org/TR/REC-xml#dt-validating'>validating processors</A>.
|
|
Thus, unless the use of a validating processor has been specified,
|
|
there can be no assurance that the contents of attribute values
|
|
have been checked for conformance to this specification.</P>
|
|
|
|
|
|
<HR>
|
|
|
|
<h1>Appendices</h1>
|
|
|
|
|
|
|
|
<H2><A NAME='Philosophy'>A. The Internal Structure of XML Namespaces (Non-Normative)</a></h2>
|
|
|
|
|
|
<H3><A NAME='sets-no-good'>A.1 The Insufficiency of the Traditional Namespace</a></h3>
|
|
<P>In the computing disciplines, the term "namespace" conventionally refers to
|
|
a <EM>set</EM> of names, i.e. a collection containing no duplicates.
|
|
However, treating the names used in XML markup
|
|
as such a namespace would greatly impair their usefulness.
|
|
The primary use of such names in XML documents is to enable identification
|
|
of logical
|
|
structures in documents by software modules such as query processors,
|
|
stylesheet-driven
|
|
rendering engines, and schema-driven validators.
|
|
Consider the following example:
|
|
</p><table cellpadding='5' border='1' bgcolor='#80ffff' width='100%'><tr><td><code><font><section><title>Book-Signing Event</title><BR><signing><BR> <author title="Mr" name="Vikram Seth" /><BR> <book title="A Suitable Boy" price="$22.95" /></signing><BR><signing><BR> <author title="Dr" name="Oliver Sacks" /><BR> <book title="The Island of the Color-Blind" price="$12.95" /></signing><BR></section></font></code></td></tr></table><p>
|
|
In this example, there are three occurrences of the name <CODE>title</CODE>
|
|
within markup, and the name alone clearly provides insufficient information
|
|
to allow correct processing by a software module.</P>
|
|
<P>Another problematic area comes from the use of "global" attributes, as
|
|
illustrated by this example, a fragment of an XML document which is to
|
|
be displayed using a CSS stylesheet:
|
|
</p><table cellpadding='5' border='1' bgcolor='#80ffff' width='100%'><tr><td><code><font><RESERVATION><BR> <NAME HTML:CLASS="largeSansSerif">Layman, A</NAME><BR> <SEAT CLASS="Y" HTML:CLASS="reallyImportant">33B</SEAT><BR> <DEPARTURE>1997-05-24T07:55:00+1</DEPARTURE></RESERVATION></font></code></td></tr></table><p>
|
|
In this case, the <CODE>CLASS</CODE> attribute, which describes the fare basis
|
|
and takes values such as "J", "Y", and "C", is distinct at all semantic levels
|
|
from the <CODE>HTML:CLASS</CODE> attribute, which
|
|
is used to
|
|
simulate syntactic richness in HTML, as a means of overcoming the
|
|
limited element repertoire by subclassing.</P>
|
|
<P>XML 1.0 does not provide a built-in way to declare "global" attributes;
|
|
items such as the HTML <CODE>CLASS</CODE> attribute are global only in their
|
|
prose description and their interpretation by HTML applications.
|
|
However, such attributes, an important distinguishing feature of which is that
|
|
their names are unique, are commonly observed to occur in a variety of
|
|
applications.</P>
|
|
|
|
|
|
|
|
<H3><A NAME='ns-breakdown'>A.2 XML Namespace Partitions</a></h3>
|
|
<P>In order to support the goal of making both qualified and unqualified names
|
|
useful in meeting their intended purpose, we identify the names appearing in
|
|
an XML namespace as belonging to one of several disjoint traditional
|
|
(i.e. set-structured) namespaces, called namespace partitions.
|
|
The partitions are:
|
|
<DL>
|
|
<DT><B>The All Element Types Partition</B></DT>
|
|
<DD>All element types in an XML namespace appear in this partition.
|
|
Each has a unique <A href='#dt-localname'>local part</A>; the
|
|
combination of the namespace name and the local part uniquely identifies the
|
|
element type.</DD>
|
|
|
|
<DT><B>The Global Attribute Partition</B></DT>
|
|
<DD>This partition contains the names of all attributes which are defined,
|
|
in this namespace, to be global.
|
|
The only required characteristic of a global attribute is that its name be
|
|
unique in the global attribute partition.
|
|
This specification makes no
|
|
assertions as to the proper usage of such attributes.
|
|
The combination of the namespace name and the attribute name uniquely
|
|
identifies the global attribute.</DD>
|
|
|
|
<DT><B>The Per-Element-Type Partitions</B></DT>
|
|
<DD>Each type in the All Element Types Partition has an
|
|
associated namespace in which appear the names of the unqualified attributes
|
|
that are provided for that element.
|
|
This is a traditional namespace because the appearance of duplicate attribute
|
|
names on an element is forbidden by XML 1.0.
|
|
The combination of the attribute name with the element's type and namespace
|
|
name uniquely identifies each unqualified attribute.</DD>
|
|
|
|
</DL>
|
|
|
|
|
|
<P>In XML documents conforming to this specification, the names of
|
|
all qualified (prefixed) attributes are assigned to the global attribute
|
|
partition, and the names of all unqualified attributes are assigned to the
|
|
appropriate per-element-type partition.</P>
|
|
|
|
|
|
|
|
<H3><A NAME='ns-expnames'>A.3 Expanded Element Types and Attribute Names</a></h3>
|
|
<P>For convenience in specifying rules and in making comparisons, we define an
|
|
expanded form, expressed here in XML element syntax, for each element type and
|
|
attribute name in an XML document.</P>
|
|
<P><a name='dt-ExpEType'></a><span class='TStart'>[Definition:] An
|
|
<b>expanded element
|
|
type</b> is expressed as an empty XML element of type
|
|
<CODE>ExpEType</CODE>.
|
|
It has a required <CODE>type</CODE> attribute which
|
|
gives the type's <code><a href='#NT-LocalPart'>LocalPart</A></code>, and an optional
|
|
<CODE>ns</CODE> attribute which, if the element is qualified, gives its
|
|
<A href='#dt-NSName'>namespace name</A>.</span></P>
|
|
<P><a name='dt-expaname'></a><span class='TStart'>[Definition:] An
|
|
<b>expanded
|
|
attribute name</b> is expressed as an empty XML element of type
|
|
<CODE>ExpAName</CODE>.
|
|
It has a required <CODE>name</CODE> attribute which gives the name.
|
|
If the attribute is global, it has a required <CODE>ns</CODE> attribute
|
|
which gives the <A href='#dt-NSName'>namespace name</A>;
|
|
otherwise, it has a required attribute <CODE>eltype</CODE> which
|
|
gives the type of the attached element, and an optional attribute
|
|
<CODE>elns</CODE> which gives the namespace name, if known, of the
|
|
attached element.</span></P>
|
|
<P>Slight variations on the examples given above will illustrate
|
|
the working of expanded element types and attribute names.
|
|
The following two fragments are each followed by a table showing
|
|
the expansion of the names:
|
|
</p><table cellpadding='5' border='1' bgcolor='#80ffff' width='100%'><tr><td><code><font><!-- 1 --> <section xmlns='urn:com:books-r-us'><BR><!-- 2 --> <title>Book-Signing Event</title><BR><!-- 3 --> <signing><BR><!-- 4 --> <author title="Mr" name="Vikram Seth" /><BR><!-- 5 --> <book title="A Suitable Boy" price="$22.95" /><BR> </signing><BR> </section></font></code></td></tr></table><p>
|
|
The names would expand as follows:
|
|
|
|
<table bgcolor='#c0d9c0' border='1' cellpadding='7'>
|
|
<tr align='left'><td rowspan='1' colspan='1'>Line</td><td rowspan='1' colspan='1'>Name</td><td rowspan='1' colspan='1'>Expanded</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan='1' colspan='1'>1</td><td rowspan='1' colspan='1'>section</td>
|
|
<td rowspan='1' colspan='1'><ExpEType type="section" ns="urn:com:books-r-us" /> </td></tr>
|
|
<tr><td rowspan='1' colspan='1'>2</td>
|
|
<td rowspan='1' colspan='1'>title</td><td rowspan='1' colspan='1'><ExpEType type="title" ns="urn:com:books-r-us" /> </td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan='1' colspan='1'>3</td>
|
|
<td rowspan='1' colspan='1'>signing</td><td rowspan='1' colspan='1'><ExpEType type="signing" ns="urn:com:books-r-us" /><BR></td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan='1' colspan='1'>4</td>
|
|
<td rowspan='1' colspan='1'>author</td><td rowspan='1' colspan='1'><ExpEType type="author" ns="urn:com:books-r-us" /> </td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan='1' colspan='1'>4</td>
|
|
<td rowspan='1' colspan='1'>title</td>
|
|
<td rowspan='1' colspan='1'><ExpAName name='title' eltype="author" elns="urn:com:books-r-us" /><BR></td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan='1' colspan='1'>4</td>
|
|
<td rowspan='1' colspan='1'>name</td>
|
|
<td rowspan='1' colspan='1'><ExpAName name='name' eltype="author" elns="urn:com:books-r-us" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan='1' colspan='1'>5</td>
|
|
<td rowspan='1' colspan='1'>book</td><td rowspan='1' colspan='1'><ExpEType type="book" ns="urn:com:books-r-us" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan='1' colspan='1'>5</td>
|
|
<td rowspan='1' colspan='1'>title</td><td rowspan='1' colspan='1'><ExpAName name='title' eltype="book" elns="urn:com:books-r-us" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan='1' colspan='1'>5</td>
|
|
<td rowspan='1' colspan='1'>price</td><td rowspan='1' colspan='1'><ExpAName name='price' eltype="book" elns="urn:com:books-r-us" /></td>
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<table cellpadding='5' border='1' bgcolor='#80ffff' width='100%'><tr><td><code><font><!-- 1 --> <RESERVATION xmlns:HTML="http://www.w3.org/TR/REC-html40"><BR><!-- 2 --> <NAME HTML:CLASS="largeSansSerif">Layman, A</NAME><BR><!-- 3 --> <SEAT CLASS="Y" HTML:CLASS="largeMonotype">33B</SEAT><BR><!-- 4 --> <HTML:A HREF='/cgi-bin/ResStatus'>Check Status</HTML:A><BR><!-- 5 --> <DEPARTURE>1997-05-24T07:55:00+1</DEPARTURE></RESERVATION></font></code></td></tr></table><p>
|
|
|
|
<table bgcolor='#c0d9c0' border='1' cellpadding='7'>
|
|
|
|
<tr><td rowspan='1' colspan='1'>1</td>
|
|
<td rowspan='1' colspan='1'>RESERVATION</td><td rowspan='1' colspan='1'><ExpEType type="RESERVATION" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan='1' colspan='1'>2</td>
|
|
<td rowspan='1' colspan='1'>NAME</td><td rowspan='1' colspan='1'><ExpEType type="NAME" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan='1' colspan='1'>2</td>
|
|
<td rowspan='1' colspan='1'>HTML:CLASS</td>
|
|
<td rowspan='1' colspan='1'><ExpAName name="CLASS" ns=http://www.w3.org/TR/REC-html40 /></td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan='1' colspan='1'>3</td>
|
|
<td rowspan='1' colspan='1'>SEAT</td><td rowspan='1' colspan='1'><ExpEType type="SEAT" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan='1' colspan='1'>3</td>
|
|
<td rowspan='1' colspan='1'>CLASS</td><td rowspan='1' colspan='1'><ExpAName name="CLASS" eltype="SEAT"></td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan='1' colspan='1'>3</td>
|
|
<td rowspan='1' colspan='1'>HTML:CLASS</td><td rowspan='1' colspan='1'><ExpAName name="CLASS" ns="http://www.w3.org/TR/REC-html40" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan='1' colspan='1'>4</td>
|
|
<td rowspan='1' colspan='1'>HTML:A</td><td rowspan='1' colspan='1'><ExpEType type="A" ns="http://www.w3.org/TR/REC-html40" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan='1' colspan='1'>4</td>
|
|
<td rowspan='1' colspan='1'>HREF</td><td rowspan='1' colspan='1'><ExpAName name="HREF" eltype="A" elns="http://www.w3.org/TR/REC-html40" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan='1' colspan='1'>5</td>
|
|
<td rowspan='1' colspan='1'>DEPARTURE</td><td rowspan='1' colspan='1'><ExpEType type="DEPARTURE" /></td>
|
|
</tr>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<H3><A NAME='check-uniqattr'>A.4 Unique Expanded Attribute Names</a></h3>
|
|
<P>The constraint expressed by "<A href='#uniqAttrs'>5.3 Uniqueness of Attributes</A>" above
|
|
may straightforwardly be implemented by requiring that
|
|
no element have
|
|
two attributes whose expanded names are equivalent, i.e. have the same
|
|
attribute-value pairs.</P>
|
|
|
|
|
|
|
|
|
|
|
|
<H2><A NAME='sec-xml-and-sgml'>B. Acknowledgements (Non-Normative)</a></h2>
|
|
|
|
<P>This work reflects input from a very large number of people,
|
|
including especially the members of the World Wide
|
|
Web Consortium XML Working Group and Special Interest Group
|
|
and the participants in the W3C Metadata Activity.
|
|
The contributions of Charles Frankston of Microsoft
|
|
were particularly valuable.</P>
|
|
|
|
|
|
|
|
<H2><A NAME='refs'>C. References</a></h2>
|
|
<DL>
|
|
<dt><a name='URNs'>RFC2141</a></dt><dd>
|
|
IETF (Internet Engineering Task Force)
|
|
<EM>RFC 2141: URN Syntax</EM>, ed. R. Moats. May 1997.
|
|
</DD>
|
|
<dt><a name='URIRef'>RFC2396</a></dt><dd>
|
|
IETF (Internet Engineering Task Force)
|
|
<EM>RFC 2396: Uniform Resource Identifiers (URI): Generic Syntax</EM>, eds.
|
|
T. Berners-Lee, R. Fielding, L. Masinter.
|
|
August 1998.
|
|
</DD>
|
|
<dt><a name='XML'>XML</a></dt><dd>
|
|
<EM>Extensible Markup Language
|
|
(XML) 1.0</EM>, eds. Tim Bray, Jean
|
|
Paoli, and C. M.
|
|
Sperberg-McQueen.
|
|
10 February 1998. Available at
|
|
<a href="http://www.w3.org/TR/REC-xml">http://www.w3.org/TR/REC-xml</a>.
|
|
</DD>
|
|
</DL>
|
|
|
|
|
|
|