<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet type="text/xsl" href="xmlspec.xsl"?>
<!DOCTYPE spec PUBLIC "-//W3C//DTD Specification V2.1//EN" "xmlspec.dtd" [
	<!ENTITY day "13">
	<!ENTITY abstract 'The XPointer &scheme-phrase; is intended to be used with the XPointer Framework <bibref ref="xptr-framework"/> to allow basic addressing of XML elements.'>
	<!ENTITY schemename "element">
	<!ENTITY monthno "11">
	<!ENTITY month "November">
	<!ENTITY W3C-path "http://www.w3.org/TR/2002/">
	<!ENTITY doctype "PR">
	<!ENTITY shortname "xptr-&schemename;">
	<!ENTITY isodate "&year;&monthno;&day;">
	<!ENTITY scheme-phrase "<code>&schemename;()</code> scheme">
	<!ENTITY year "2002">
	<!ENTITY media-types "one of <code>text/xml</code>, 
<code>application/xml</code>, 
<code>text/xml-external-parsed-entity</code>,
or <code>application/xml-external-parsed-entity</code>">
	<!ENTITY xptr-framework-file "&W3C-path;&doctype;-xptr-framework-&isodate;/">
	<!ENTITY XML "http://www.w3.org/TR/REC-xml">
	<!ENTITY XMLNames "http://www.w3.org/TR/REC-xml-names/">
]>
<spec w3c-doctype="pr" status="final">
	<header>
		<title>XPointer &schemename;() Scheme</title>
		<w3c-designation>&doctype;-&shortname;-&isodate;</w3c-designation>
		<w3c-doctype>W3C Proposed Recommendation</w3c-doctype>
		<pubdate>
			<day>&day;</day>
			<month>&month;</month>
			<year>&year;</year>
		</pubdate>
		<publoc>
			<loc href="&W3C-path;&doctype;-&shortname;-&isodate;/">&W3C-path;&doctype;-&shortname;-&isodate;/</loc>
 			</publoc>
		<altlocs>
			<loc href="&W3C-path;&doctype;-&shortname;-&isodate;/xptr-element.xml">XML</loc>
		</altlocs>
		<latestloc>
			<loc href="http://www.w3.org/TR/&shortname;/">http://www.w3.org/TR/&shortname;/</loc>
		</latestloc>
		<prevlocs>
			<loc href="http://www.w3.org/TR/2002/WD-xptr-element-20020710/">http://www.w3.org/TR/2002/WD-xptr-element-20020710/</loc>
<!--
			<loc href="http://www.w3.org/TR/2001/CR-xptr-20010911/">http://www.w3.org/TR/2001/CR-xptr-20010911/</loc>
-->
		</prevlocs>
		<authlist>
			<author>
				<name>Paul Grosso</name>
				<affiliation>Arbortext, Inc.</affiliation>
				<email href="mailto:paul@arbortext.com">paul@arbortext.com</email>
			</author>
			<author>
				<name>Eve Maler</name>
				<affiliation>Sun Microsystems</affiliation>
				<email href="mailto:eve.maler@sun.com">eve.maler@sun.com</email>
			</author>
			<author>
				<name>Jonathan Marsh</name>
				<affiliation>Microsoft</affiliation>
				<email href="mailto:jmarsh@microsoft.com">jmarsh@microsoft.com</email>
			</author>
			<author>
				<name>Norman Walsh</name>
				<affiliation>Sun Microsystems</affiliation>
				<email href="mailto:Norman.Walsh@Sun.COM">Norman.Walsh@Sun.COM</email>
			</author>
		</authlist>
		<abstract>
			<p>&abstract;</p>
		</abstract>
		<status>
			<p>This document is a <loc href="http://www.w3.org/Consortium/Process-20010719/#RecsPR">Proposed Recommendation (PR)</loc> of the W3C.	This document has been produced by the <loc href="http://www.w3.org/XML/Linking">W3C XML Linking Working Group</loc> as part of the <loc href="http://www.w3.org/XML/Activity">XML Activity</loc>.  It is intended to address a subset of the original <loc href="http://www.w3.org/TR/NOTE-xptr-req">XPointer requirements</loc>, and to serve as a possible part of a recommendation to the IETF for a fragment identifier syntax for the XML Mime types.</p>
			<p>W3C Advisory Committee Members are invited to send formal review comments to the W3C Team until 13 December 2002 at <loc href="mailto:team-xptr-review@w3.org">team-xptr-review@w3.org</loc>.  The public is invited to send comments to the public mailing list <loc href="mailto:www-xml-linking-comments@w3.org">www-xml-linking-comments@w3.org</loc> (<loc href="http://lists.w3.org/Archives/Public/www-xml-linking-comments/">archive</loc>). After the review the Director will announce the document's disposition. This announcement should not be expected sooner than 14 days after the end of the review.</p>
			<p>This document is based upon the <loc href="http://www.w3.org/TR/2001/CR-xptr-20010911/">XPointer Candidate Recommendation</loc> published on 11 September 2001.  Feedback received during that review and a lack of a sufficient number of complete implementations led the Working Group to factor the basic functionality specified there into four specifications: the <loc href="http://www.w3.org/TR/xptr-framework/">XPointer Framework</loc>, the <loc href="http://www.w3.org/TR/xptr-xmlns/">XPointer xmlns() Scheme</loc>, the XPointer element() scheme (this specification), and the <loc href="http://www.w3.org/TR/xptr-xpointer/">XPointer xpointer() scheme</loc>.  This specification subsequently went through an additional <loc href="http://www.w3.org/TR/2002/WD-xptr-framework-20020710/">Last Call</loc> period.  The XML Linking Working Group believes that this specification addresses all relevant Last Call and Candidate Recommendation issues, and represents an interoperable subset of the implementations documented in the <loc href="http://www.w3.org/XML/2000/09/LinkingImplementations.html">previous Implementation Report</loc>, and thus that a further Candidate Recommendation period is not necessary.  Information about more recent implementations of subsets relevant to this specification and the <loc href="http://www.w3.org/TR/xptr-xmlns/">XPointer xmlns() Scheme</loc> and <loc href="http://www.w3.org/TR/xptr-framework/">XPointer Framework</loc> can be found in the <loc href="http://www.w3.org/XML/2002/10/LinkingImplementations.html">new Implementation Report</loc>.  Other specifications such as <loc href="http://www.w3.org/TR/xinclude/">XInclude 1.0</loc> already make normative references to this specification, which makes timely progression to Recommendation desirable.</p>
			<p>There are patent disclosures and license commitments associated with
this working draft, which may be found on the <loc href="http://www.w3.org/2002/06/xptr_IPR_summary.html">XPointer IPR Statement</loc> page in conformance with <loc href="http://www.w3.org/Consortium/Process-20010719/#ipr">W3C policy</loc>.</p>
			<p>Publication as a Proposed Recommendation does not imply endorsement by the W3C membership. This is still a draft document and may be updated, replaced or made obsolete by other documents at any time. It is inappropriate to cite a W3C Proposed Recommendation as other than a "work in progress." A list of current W3C Recommendations and other technical documents can be found at <loc href="http://www.w3.org/TR/">http://www.w3.org/TR/</loc>.</p>
		</status>
		<langusage>
			<language id="en">English</language>
			<language id="ebnf">Extended Backus-Naur Form (formal grammar)</language>
		</langusage>
		<revisiondesc>
			<slist>
				<sitem>20020515: Initial draft.</sitem>
				<sitem>20020518: Second draft. Updated the Status section to give more context
and made the extension of the infoset to encompass entities more explicit.</sitem>
				<sitem>20020522: Third draft. Incorporated editorial changes agreed on in
today's telecon, plus a few items pointed out in private communications.</sitem>
			</slist>
		</revisiondesc>
	</header>
	<body>
		<div1>
			<head>Introduction </head>
			<p>&abstract;</p>
			<p><termdef id="dt-must" term="Must, May, etc.">The key words <term>must</term>, <term>must not</term>, <term>required</term>, <term>shall</term>, <term>shall not</term>, <term>should</term>, <term>should not</term>, <term>recommended</term>, <term>may</term>, and <term>optional</term> in this specification are to be interpreted as described in <bibref ref="rfc2119"/>.</termdef></p>
			<p>The terms pointer part, scheme, XPointer processor, error, and namespace binding context are used in this specification as <xspecref href="&xptr-framework-file;#terminology">defined</xspecref> in the XPointer Framework specification.</p>
			<p>The formal grammar for the &scheme-phrase; is given using simple Extended Backus-Naur Form (EBNF) notation, as described in the XML Recommendation <bibref ref="XML"/>.</p>
		</div1>
		<div1 id="conformance">
			<head>Conformance </head>
			<p>This specification normatively depends on the XPointer Framework <bibref ref="xptr-framework"/> specification.</p>
			<p>XPointer processors supporting the &scheme-phrase; depend on the ability of applications to expose an XML resource as at least the XML Information Set <bibref ref="Infoset"/> and XML Schema <bibref ref="xsd"/> information items and properties listed in the XPointer Framework specification.</p>
			<p>Conforming XPointer processors claiming to support the &scheme-phrase;&#x20;<termref def="dt-must">must</termref> conform to the behavior defined in this specification and <termref def="dt-must">may</termref> conform to additional XPointer scheme specifications.</p>
		</div1>
		<div1 id="model">
			<head>Language and Processing</head>
			<p>This section describes the syntax and semantics of the &scheme-phrase; and the behavior of XPointer processors with respect to this scheme.</p>
			<p>The scheme name is <quote>&schemename;</quote>. The scheme data syntax is as follows; if scheme data in a pointer part with the &scheme-phrase; does not conform to the syntax defined in this section the pointer part does not identify a subresource.</p>
			<scrap>
				<head>element() Scheme Syntax</head>
				<prodgroup pcw2="6" pcw4="15" pcw5="11.5">
					<prod id="NT-ElementSchemeData">
						<lhs>ElementSchemeData</lhs>
						<rhs>(<xnt href="&XMLNames;#NT-NCName">NCName</xnt>&#x20;<nt def="NT-ChildSequence">ChildSequence</nt>?) | <nt def="NT-ChildSequence">ChildSequence</nt>
						</rhs>
					</prod>
					<prod id="NT-ChildSequence">
						<lhs>ChildSequence</lhs>
						<rhs>('/' [1-9] [0-9]*)+</rhs>
					</prod>
				</prodgroup>
			</scrap>
			<p>The scheme data consists of either a <xnt href="&XMLNames;#NT-NCName">NCName</xnt> (as defined in the XML namespaces specification <bibref ref="XML-Names"/>) or a child sequence, or both.</p>
			<p>A <xnt href="&XMLNames;#NT-NCName">NCName</xnt> appearing alone identifies a single element exactly as it would in a shorthand pointer, as defined in the XPointer Framework <bibref ref="xptr-framework"/> 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 <quote>intro</quote>:</p>
			<eg>element(intro)</eg>
			<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 <kw>[document element]</kw> 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>
			<eg>element(/1/2)</eg>
			<p>A child sequence appearing after an <xnt href="&XMLNames;#NT-NCName">NCName</xnt> 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 <attval>intro</attval>, then locating that element's third child element, then finally identifying that element's first child element:</p>
			<eg>element(intro/3/1)</eg>
			<p>If either the <xnt href="&XMLNames;#NT-NCName">NCName</xnt> or the child sequence does not locate an element, no element is identified by the pointer part as a whole.</p>
			<p>The &scheme-phrase; does not use the namespace binding context because it does not support qualified names.</p>
		</div1>
	</body>
	<back>
		<div1 id="references">
			<head>Normative References</head>
			<blist>
				<bibl id="Infoset" key="Infoset">
					John Cowan and Richard Tobin, editors.
					<titleref href="http://www.w3.org/TR/xml-infoset/">XML Information Set</titleref>.
					World Wide Web Consortium, 2001.
				</bibl>
				<bibl id="rfc2119" key="RFC 2119">
					Scott Bradner, 
					<titleref href="http://www.rfc-editor.org/rfc/rfc2119.txt">RFC 2119: Key words for use in RFCs to Indicate Requirement Levels</titleref>.
					Internet Engineering Task Force, 1997.
				</bibl>
				<bibl id="XML" key="XML">
					Tim Bray, Jean Paoli, C.M. Sperberg-McQueen, and Eve Maler, editors.
					<titleref href="http://www.w3.org/TR/REC-xml">Extensible Markup Language (XML) 1.0 (Second Edition).</titleref> 
					World Wide Web Consortium, 2000.
				</bibl>
				<bibl id="XML-Names" key="XML-Names">
					Tim Bray, Dave Hollander, and Andrew Layman, editors.  
					<titleref href="http://www.w3.org/TR/REC-xml-names/">Namespaces in XML</titleref>. 
					World Wide Web Consortium, 1999.
				</bibl>
				<bibl id="xptr-framework" key="XPtrFrame">
					Paul Grosso, Eve Maler, Jonathan Marsh, and Norman Walsh, editors.
					<titleref href="&xptr-framework-file;">XPointer Framework</titleref>.
					World Wide Web Consortium, 2002.
				</bibl>
				<bibl id="xsd" key="XMLSchema">
					Henry Thompson et al., editors. 
					<titleref href="http://www.w3.org/TR/xmlschema-1/">XML Schema Part 1.</titleref> 
					World Wide Web Consortium, 2001.
				</bibl>
			</blist>
		</div1>
	</back>
</spec>
