index.html 15.4 KB

<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en"><head>
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
   <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>XPointer xmlns() Scheme</title><style type="text/css">
code           { font-family: monospace; }

div.constraint,
div.issue,
div.note,
div.notice     { margin-left: 2em; }

li p           { margin-top: 0.3em;
                 margin-bottom: 0.3em; }

div.exampleInner pre { margin-left: 1em;
                       margin-top: 0em; margin-bottom: 0em}
div.exampleOuter {border: 4px double gray;
                  margin: 0em; padding: 0em}
div.exampleInner { background-color: #d5dee3;
                   border-top-width: 4px;
                   border-top-style: double;
                   border-top-color: #d3d3d3;
                   border-bottom-width: 4px;
                   border-bottom-style: double;
                   border-bottom-color: #d3d3d3;
                   padding: 4px; margin: 0em }
div.exampleWrapper { margin: 4px }
div.exampleHeader { font-weight: bold;
                    margin: 4px}
</style><link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/W3C-REC.css"></head><body><div class="head"><p><a href="http://www.w3.org/"><img src="http://www.w3.org/Icons/w3c_home" alt="W3C" height="48" width="72"></a></p>
<h1><a name="title" id="title"></a>XPointer xmlns() Scheme</h1>
<h2><a name="w3c-doctype" id="w3c-doctype"></a>W3C Recommendation 25 March 2003</h2><dl><dt>This version:</dt><dd>
			<a href="http://www.w3.org/TR/2003/REC-xptr-xmlns-20030325/">http://www.w3.org/TR/2003/REC-xptr-xmlns-20030325/</a>
		</dd><dt>Latest version:</dt><dd>
			<a href="http://www.w3.org/TR/xptr-xmlns/">http://www.w3.org/TR/xptr-xmlns/</a>
		</dd><dt>Previous version:</dt><dd>
			<a href="http://www.w3.org/TR/2002/PR-xptr-xmlns-20021113/">http://www.w3.org/TR/2002/PR-xptr-xmlns-20021113/</a>
			
		</dd><dt>Editors:</dt><dd>Steven J. DeRose <a href="mailto:sderose@acm.org">&lt;sderose@acm.org&gt;</a></dd><dd>Ron Daniel Jr. <a href="mailto:rdaniel@taxonomystrategies.com">&lt;rdaniel@taxonomystrategies.com&gt;</a></dd><dd>Eve Maler, Sun Microsystems <a href="mailto:eve.maler@sun.com">&lt;eve.maler@sun.com&gt;</a></dd><dd>Jonathan Marsh, Microsoft <a href="mailto:jmarsh@microsoft.com">&lt;jmarsh@microsoft.com&gt;</a></dd></dl><p>Please refer to the <a href="http://www.w3.org/2003/03/REC-xptr-20030325-errata"><strong>errata</strong></a> for this document, which may
       include some normative corrections.</p><p>This document is also available in these non-normative formats: <a href="http://www.w3.org/TR/2003/REC-xptr-xmlns-20030325/xptr-xmlns.xml">XML</a>.</p><p>The English version of this specification is the only normative version.
Non-normative <a href="http://www.w3.org/2003/03/xptr-translations"><strong>translations</strong></a> may also be available.</p><p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a>&nbsp;&copy;&nbsp;2003&nbsp;<a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>&reg;</sup> (<a href="http://www.lcs.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>, <a href="http://www.ercim.org/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>, <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-software">software licensing</a> rules apply.</p></div><hr><div>
<h2><a name="abstract" id="abstract"></a>Abstract</h2><p>The XPointer <code>xmlns()</code> scheme is intended to be used with the XPointer Framework <a href="#xptr-framework">[XPtrFrame]</a> to allow correct interpretation of namespace prefixes in pointers, for instance, namespace-qualified scheme names and namespace-qualified element or attribute names appearing within scheme data.</p></div><div>
<h2><a name="status" id="status"></a>Status of this Document</h2><p><em>This section describes the status of this document at the time of its publication. Other documents may supersede this document. The latest status of this document series is maintained at the W3C.</em></p><p>This document is a <a href="http://www.w3.org/Consortium/Process-20010719/#RecsW3C">Recommendation (REC)</a> of the W3C.	It 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>This document has been produced by the <a href="http://www.w3.org/XML/Linking">W3C XML Linking Working Group</a> as part of the <a href="http://www.w3.org/XML/Activity">XML Activity</a>.  It is intended to address a subset of the original <a href="http://www.w3.org/TR/NOTE-xptr-req">XPointer requirements</a>, and to serve, along with the accompanying <a href="http://www.w3.org/TR/xptr-framework/">XPointer Framework</a> and <a href="http://www.w3.org/TR/xptr-element/">XPointer element() Scheme</a> specifications, as a part of a fragment identifier syntax for the XML Media types.</p><p>Public comments on this Recommendation are welcome.  Please send them to
the public mailing list <a href="mailto:www-xml-linking-comments@w3.org">www-xml-linking-comments@w3.org</a> (<a href="http://lists.w3.org/Archives/Public/www-xml-linking-comments/">archive</a>).</p><p>Information about implementations relevant to this
specification and the accompanying <a href="http://www.w3.org/TR/xptr-element/">XPointer element() Scheme</a> and <a href="http://www.w3.org/TR/xptr-xmlns/">XPointer xmlns() Scheme</a> can be found in the <a href="http://www.w3.org/XML/2002/10/LinkingImplementations.html">Implementation Report</a>.</p><p>There are patent disclosures and license commitments associated with
this Recommendation, which may be found on the <a href="http://www.w3.org/2002/06/xptr_IPR_summary.html">XPointer IPR Statement</a> page in conformance with <a href="http://www.w3.org/Consortium/Process-20010719/#ipr">W3C policy</a>.</p><p>A list of current W3C Recommendations and other technical documents can
be found at <a href="http://www.w3.org/TR/">http://www.w3.org/TR/</a>.  W3C publications may be updated, replaced, or obsoleted by other documents at any time.</p></div><div class="toc">
<h2><a name="contents" id="contents"></a>Table of Contents</h2><p class="toc">1 <a href="#introduction">Introduction</a><br>
2 <a href="#conformance">Conformance </a><br>
3 <a href="#model">Language and Processing</a><br>
</p>
<h3><a name="appendices" id="appendices"></a>Appendices</h3><p class="toc">A <a href="#references">Normative References</a><br>
B <a href="#references2">Non-Normative References</a> (Non-Normative)<br>
</p></div><hr><div class="body"><div class="div1">
<h2><a name="introduction" id="introduction"></a>1 Introduction</h2><p>The XPointer <code>xmlns()</code> scheme is intended to be used with the XPointer Framework <a href="#xptr-framework">[XPtrFrame]</a> to allow correct interpretation of namespace prefixes in pointers, for instance, namespace-qualified scheme names and namespace-qualified element or attribute names appearing within scheme data.</p><p>[<a name="dt-must" id="dt-must" title="Must, May, etc.">Definition</a>: The key words <b>must</b>, <b>must not</b>, <b>required</b>, <b>shall</b>, <b>shall not</b>, <b>should</b>, <b>should not</b>, <b>recommended</b>, <b>may</b>, and <b>optional</b> in this specification are to be interpreted as described in <a href="#rfc2119">[RFC 2119]</a>.]</p><p>The terms pointer part, scheme, XPointer processor, and namespace binding context are used in this specification as <a href="http://www.w3.org/TR/2003/REC-xptr-framework-20030325/#terminology">defined</a> in the XPointer Framework specification.</p><p>The formal grammar for the <code>xmlns()</code> scheme is given using simple Extended Backus-Naur Form (EBNF) notation, as described in the XML Recommendation <a href="#XML">[XML]</a>.</p></div><div class="div1">
<h2><a name="conformance" id="conformance"></a>2 Conformance </h2><p>This specification normatively depends on the XPointer Framework <a href="#xptr-framework">[XPtrFrame]</a> specification.</p><p>Conforming XPointer processors claiming to support the <code>xmlns()</code> scheme must
conform to the behavior defined in this specification and may conform to additional
XPointer scheme specifications.</p></div><div class="div1">
<h2><a name="model" id="model"></a>3 Language and Processing</h2><p>This section describes the syntax and semantics of the <code>xmlns()</code> scheme and the behavior of XPointer processors with respect to this scheme.</p><p>The scheme name is "xmlns". The scheme data syntax is as follows; if scheme data in a pointer part with the <code>xmlns()</code> scheme does not conform to the syntax defined in this section the pointer part does not contribute an entry to the namespace binding context.</p>
<h5><a name="d0e226" id="d0e226"></a>xmlns() Scheme Syntax</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-XmlnsSchemeData" id="NT-XmlnsSchemeData"></a>[1]&nbsp;&nbsp;&nbsp;</td><td><code>XmlnsSchemeData</code></td><td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td><td><code>
						<a href="http://www.w3.org/TR/REC-xml-names/#NT-NCName">NCName</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>? <a href="#NT-EscapedNamespaceName">EscapedNamespaceName</a>
					</code></td></tr></tbody><tbody><tr valign="baseline"><td><a name="NT-EscapedNamespaceName" id="NT-EscapedNamespaceName"></a>[2]&nbsp;&nbsp;&nbsp;</td><td><code>EscapedNamespaceName</code></td><td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td><td><code>
						<a href="http://www.w3.org/TR/2003/REC-xptr-framework-20030325/#NT-EscapedData">EscapedData</a>*</code></td></tr></tbody></table><p><a href="http://www.w3.org/TR/REC-xml#NT-S">S</a> is as defined in the XML specification <a href="#XML">[XML]</a>, <a href="http://www.w3.org/TR/REC-xml-names/#NT-QName">NCName</a> is as defined in the XML Namespaces specification <a href="#XML-Names">[XML-Names]</a>, and <a href="http://www.w3.org/TR/2003/REC-xptr-framework-20030325/#NT-EscapedData">EscapedData</a> is as defined in the XPointer Framework specification <a href="#xptr-framework">[XPtrFrame]</a>.</p><p>A pointer part with the <code>xmlns()</code> scheme declares a namespace prefix (<a href="http://www.w3.org/TR/REC-xml-names/#NT-QName">NCName</a>) to be associated with an XML namespace name (<a href="#NT-EscapedNamespaceName">EscapedNamespaceName</a> with any circumflex-escaping undone). Each pointer part that uses the <code>xmlns()</code> scheme contributes a new entry to the namespace binding context. If a pointer part defines a binding for a namespace prefix that already has an entry in the namespace binding context, the new entry overrides the old one.</p><p>For example, the following pointer part binds the <b>abc</b> prefix to the <b>http://example.com/ns/abc</b> namespace name:</p><div class="exampleInner"><pre>xmlns(abc=http://example.com/ns/abc)</pre></div><p>A pointer part that uses the <code>xmlns()</code> scheme never identifies a subresource and thus the XPointer processor evaluation always continues with the next pointer part. However,  evaluation of the <code>xmlns</code> pointer part has a potential effect on pointer parts to its right. </p><p>The XPointer Framework on which this specification is based dictates that the initial namespace binding context prior to evaluation of the first pointer part consists of a single entry: the <code>xml</code> prefix bound to the URI <code>http:/www.w3.org/XML/1998/namespace</code>. Following the rules specified by the Framework, any attempt by a pointer part using the <code>xmlns()</code> scheme to redefine the <code>xml</code> prefix will result in no change to the namespace binding context.  Any attempt to bind a prefix to the namespace name <code>http://www.w3.org/XML/1998/namespace</code> will result in no change to the namespace binding context.  Any attempt to define the <code>xmlns</code> prefix will result in no change to the namespace binding context.  Any attempt to bind a prefix to the namespace name <code>http://www.w3.org/2000/xmlns/</code> will result in no change to the namespace binding context.</p><p>The prefix used in pointer parts need not match the prefix (or lack of a prefix) actually used in the XML resource into which the pointer part is addressing. For example, assume the following target XML resource:</p><div class="exampleInner"><pre>&lt;customer xmlns="http://example.org/customer"&gt;
   &lt;name xmlns="http://example.org/personal-info"&gt;John Doe&lt;/name&gt;
&lt;/customer&gt;</pre></div><p>Evaluation of a pointer part that refers to element <code>customer</code> will not identify any subresources if the namespace binding context contains no entry that binds a prefix to the namespace name <code>http://example.org/customer</code>. The following two pointer parts allow the xpointer() <a href="#xptr">[XPointer]</a> part to the right to refer to the <code>customer</code> element (as <code>c:customer</code>) and the name element (as <code>p:name</code>):</p><div class="exampleInner"><pre>xmlns(c=http://example.org/customer) xmlns(p=http://example.org/personal-info)
xpointer(/c:customer/p:name)</pre></div></div></div><div class="back"><div class="div1">
<h2><a name="references" id="references"></a>A Normative References</h2><dl><dt class="label"><a name="rfc2119" id="rfc2119"></a>RFC 2119</dt><dd>
					Scott Bradner, 
					<a href="http://www.rfc-editor.org/rfc/rfc2119.txt"><cite>RFC 2119: Key words for use in RFCs to Indicate Requirement Levels</cite></a>.
					Internet Engineering Task Force, 1997.
				</dd><dt class="label"><a name="XML" id="XML"></a>XML</dt><dd>
					Tim Bray, Jean Paoli, C.M. Sperberg-McQueen, and Eve Maler, editors.
					<a href="http://www.w3.org/TR/REC-xml"><cite>Extensible Markup Language (XML) 1.0 (Second Edition).</cite></a> 
					World Wide Web Consortium, 2000.
				</dd><dt class="label"><a name="xptr-framework" id="xptr-framework"></a>XPtrFrame</dt><dd>
					Paul Grosso, Eve Maler, Jonathan Marsh, and Norman Walsh, editors.
					<a href="http://www.w3.org/TR/2003/REC-xptr-framework-20030325/"><cite>XPointer Framework</cite></a>.
					World Wide Web Consortium, 2002.
				</dd><dt class="label"><a name="XML-Names" id="XML-Names"></a>XML-Names</dt><dd>
					Tim Bray, Dave Hollander, and Andrew Layman, editors.  
					<a href="http://www.w3.org/TR/REC-xml-names/"><cite>Namespaces in XML</cite></a>. 
					World Wide Web Consortium, 1999.
				</dd></dl></div><div class="div1">
<h2><a name="references2" id="references2"></a>B Non-Normative References (Non-Normative)</h2><dl><dt class="label"><a name="xptr" id="xptr"></a>XPointer</dt><dd>
					Steve DeRose, Eve Maler, and Ron Daniels, editors. 
					<a href="http://www.w3.org/TR/xptr-xpointer/"><cite>XPointer xpointer() Scheme</cite></a>. 
					World Wide Web Consortium, 2002.  <em>Work in progress.</em>
				</dd></dl></div></div></body></html>