index.html 14.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 element() 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 element() 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-element-20030325/">http://www.w3.org/TR/2003/REC-xptr-element-20030325/</a>
		</dd><dt>Latest version:</dt><dd>
			<a href="http://www.w3.org/TR/xptr-element/">http://www.w3.org/TR/xptr-element/</a>
		</dd><dt>Previous version:</dt><dd>
			<a href="http://www.w3.org/TR/2002/PR-xptr-element-20021113/">http://www.w3.org/TR/2002/PR-xptr-element-20021113/</a>
			
		</dd><dt>Editors:</dt><dd>Paul Grosso, Arbortext, Inc. <a href="mailto:paul@arbortext.com">&lt;paul@arbortext.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><dd>Norman Walsh, Sun Microsystems <a href="mailto:Norman.Walsh@Sun.COM">&lt;Norman.Walsh@Sun.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-element-20030325/xptr-element.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>element()</code> scheme is intended to be used with the XPointer Framework <a href="#xptr-framework">[XPtrFrame]</a> to allow basic addressing of XML elements.</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-xmlns/">XPointer xmlns() 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>Appendix</h3><p class="toc">A <a href="#references">Normative References</a><br>
</p></div><hr><div class="body"><div class="div1">
<h2><a name="introduction" id="introduction"></a>1 Introduction</h2><p>The XPointer <code>element()</code> scheme is intended to be used with the XPointer Framework <a href="#xptr-framework">[XPtrFrame]</a> to allow basic addressing of XML elements.</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, error, 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>element()</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>XPointer processors supporting the <code>element()</code> scheme depend on the ability of applications to expose an XML resource as at least the XML Information Set <a href="#Infoset">[Infoset]</a> and XML Schema <a href="#xsd">[XMLSchema]</a> information items and properties listed in the XPointer Framework specification.</p><p>Conforming XPointer processors claiming to support the <code>element()</code> scheme <a title="Must, May, etc." href="#dt-must">must</a> conform to the behavior defined in this specification and <a title="Must, May, etc." href="#dt-must">may</a> 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>element()</code> scheme and the behavior of XPointer processors with respect to this scheme.</p><p>The scheme name is "element". The scheme data syntax is as follows; if scheme data in a pointer part with the <code>element()</code> scheme does not conform to the syntax defined in this section the pointer part does not identify a subresource.</p>
<h5><a name="d0e245" id="d0e245"></a>element() Scheme Syntax</h5><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td><a name="NT-ElementSchemeData" id="NT-ElementSchemeData"></a>[1]&nbsp;&nbsp;&nbsp;</td><td><code>ElementSchemeData</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="#NT-ChildSequence">ChildSequence</a>?) | <a href="#NT-ChildSequence">ChildSequence</a>
						</code></td></tr><tr valign="baseline"><td><a name="NT-ChildSequence" id="NT-ChildSequence"></a>[2]&nbsp;&nbsp;&nbsp;</td><td><code>ChildSequence</code></td><td>&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;</td><td><code>('/' [1-9] [0-9]*)+</code></td></tr></tbody></table><p>The scheme data consists of either a <a href="http://www.w3.org/TR/REC-xml-names/#NT-NCName">NCName</a> (as defined in the XML namespaces specification <a href="#XML-Names">[XML-Names]</a>) or a child sequence, or both.</p><p>A <a href="http://www.w3.org/TR/REC-xml-names/#NT-NCName">NCName</a> appearing alone identifies a single element exactly as it would in a shorthand pointer, as defined in the XPointer Framework <a href="#xptr-framework">[XPtrFrame]</a> specification, except that failure to identify an element results simply in no subresource being identified by this pointer part rather than an XPointer Framework error.</p><p>For example, the following pointer part identifies the element with an ID (as defined in XPointer Framework) of "intro":</p><div class="exampleInner"><pre>element(intro)</pre></div><p>A child sequence appearing alone identifies an element by means of stepwise navigation, which is directed by a sequence of integers separated by slashes (/); each integer <var>n</var> locates the <var>n</var>th child element of the previously located element. The integer <var>n</var> following the first slash locates the <var>n</var>th top-level element: either the unique document element (the <b>[document element]</b> property, if the resource is an XML document, in which case the integer is always 1) or one of potentially several root elements (the entity root element(s), if the resource is an external parsed entity). For example, assuming that the XML resource is a whole XML document, the following pointer part identifies the second child element inside the root element of the document:</p><div class="exampleInner"><pre>element(/1/2)</pre></div><p>A child sequence appearing after an <a href="http://www.w3.org/TR/REC-xml-names/#NT-NCName">NCName</a> identifies an element by means of stepwise navigation, starting from the element located by the given name. For example, the following pointer part identifies an element by first locating the element identified by the value "intro", then locating that element's third child element, then finally identifying that element's first child element:</p><div class="exampleInner"><pre>element(intro/3/1)</pre></div><p>If either the <a href="http://www.w3.org/TR/REC-xml-names/#NT-NCName">NCName</a> or the child sequence does not locate an element, no element is identified by the pointer part as a whole.</p><p>The <code>element()</code> scheme does not use the namespace binding context because it does not support qualified names.</p></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="Infoset" id="Infoset"></a>Infoset</dt><dd>
					John Cowan and Richard Tobin, editors.
					<a href="http://www.w3.org/TR/xml-infoset/"><cite>XML Information Set</cite></a>.
					World Wide Web Consortium, 2001.
				</dd><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="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><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="xsd" id="xsd"></a>XMLSchema</dt><dd>
					Henry S. Thompson et al., editors. 
					<a href="http://www.w3.org/TR/xmlschema-1/"><cite>XML Schema Part 1.</cite></a> 
					World Wide Web Consortium, 2001.
				</dd></dl></div></div></body></html>