<?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 "10">
<!ENTITY month "July">
<!ENTITY monthno "07">
<!ENTITY year "2002">
<!ENTITY trpath "http://www.w3.org/TR/">
<!ENTITY W3C-path "&trpath;&year;/">
<!ENTITY doctype "WD">
<!ENTITY isodate "&year;&monthno;&day;">
<!ENTITY schemename "element">
<!ENTITY shortname "&schemename;">
<!ENTITY scheme-phrase "<code>&schemename;()</code> scheme">
<!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 dirname "&W3C-path;&doctype;-xptr-&shortname;-&isodate;/">
<!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 XML "http://www.w3.org/TR/REC-xml">
<!ENTITY XMLNames "http://www.w3.org/TR/REC-xml-names">
<!ENTITY xptr-framework-file "&W3C-path;&doctype;-xptr-framework-&isodate;/">
]>
<spec w3c-doctype="wd" status="final">
<header>
<title>XPointer &schemename;() Scheme</title>
<w3c-designation>&doctype;-xptr-&shortname;-&isodate;</w3c-designation>
<w3c-doctype>W3C Working Draft</w3c-doctype>
<pubdate><day>&day;</day><month>&month;</month><year>&year;</year></pubdate>
<publoc><loc href="&dirname;">&dirname;</loc></publoc>
<latestloc><loc href="&trpath;xptr-&shortname;/">&trpath;xptr-&shortname;/</loc></latestloc>
<prevlocs><loc href="http://www.w3.org/TR/2001/CR-xptr-20010911/">http://www.w3.org/TR/2001/CR-xptr-20010911/</loc></prevlocs>
<otherlocs>This document is also available in the following non-normative format: <loc href="&dirname;&shortname;.xml">XML</loc> (<loc href="&dirname;xmlspec.dtd">DTD</loc>, <loc href="&dirname;xmlspec.xsl">XSL</loc>).
</otherlocs>
<authlist>
<author><name>Paul Grosso</name><affiliation>Arbortext, Inc.</affiliation>
<email href="mailto:pgrosso@arbortext.com">pgrosso@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 is a Last Call W3C Working Draft for review by W3C members and other
interested parties. It is a draft document and may be updated, replaced, or
obsoleted by other documents at any time. It is inappropriate to use W3C Working
Drafts as reference material or to cite them as other than <quote>work in
progress.</quote> Comments on this document should be sent no later than 31 July 2002 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>).</p>
 <p>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>.  The goals of this work are set out in the <loc href="http://www.w3.org/TR/NOTE-xptr-req">XPointer
Requirements</loc> document.</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>Even though it has not been seen before in this form, this specification
is being published as a Last Call Working Draft because it is essentially
a subset of the previous specification. This specification takes the XPointer
shorthand form that was in the <loc href="http://www.w3.org/TR/2001/CR-xptr-20010911/">XPointer
Candidate Recommendation</loc> published on 11 September 2001 and puts it
into an &scheme-phrase;. Note that the <quote>bare names</quote> functionality
has been extended slightly to include a schema-based ID addressing option.</p>
<p>We are specifically seeking input on what the XML Linking WG should recommend
as a minimum conformance level for the purposes of XPointer usage in fragment
identifiers for any resource whose Internet media type is &media-types;. Actually
specifying this level is an issue that will have to be taken up normatively
in the successor to IETF RFC 3023 <bibref ref="draft-xmlmediatypes"/>.</p>
 <p>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, pointer part, scheme, XPointer processor, application,
error, failure, and namespace binding context are used in this specification
as <xspecref href="&xptr-framework-file;#terminology">defined</xspecref> in
the XPointer Framework specification.  Note that errors defined by this specification
are distinct from XPointer Framework errors.</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; normatively depend on
sufficient input about an XML resource to identify 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; must
conform to the behavior defined in this specification and may 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, it is an &scheme-phrase; error
and the pointer part fails.</p>
<scrap>
<head>element() Scheme Syntax</head>
<prodgroup pcw2="6" pcw4="15" pcw5="11.5">
<prod id="NT-elementschemedata">
<lhs>&schemename;schemedata</lhs><rhs>(<xnt href="&XML;#NT-Name">Name</xnt>, <nt
def="NT-childseq">childseq</nt>?) | <nt def="NT-childseq">childseq</nt></rhs>
</prod>
<prod id="NT-childseq">
<lhs>childseq</lhs><rhs>('/' [1-9] [0-9]* )+</rhs>
</prod>
</prodgroup></scrap>
<p>The scheme data consists of either a <xnt href="&XML;#NT-Name">Name</xnt> (as
defined in the XML specification <bibref ref="XML"/>) or a child sequence,
or both.</p>
<p>A <xnt href="&XML;#NT-Name">Name</xnt> appearing alone identifies a single
element exactly as for the <xnt href="&XML;#NT-Name">Name</xnt> shorthand
form defined in the XPointer Framework <bibref ref="xptr-framework"/> specification,
except that failure to identify a subresource results in pointer part failure
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>foo</quote>:</p>
<eg>element(foo)</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 following the first slash represents
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, 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 a <xnt href="&XML;#NT-Name">Name</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
as follows by first locating the element identified by the value <quote><attval>intro</attval></quote>,
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="&XML;#NT-Name">Name</xnt> or the child sequence
does not locate an element, no element is identified by the pointer part as
a whole and the pointer part fails.</p>
<p>The &scheme-phrase; does not use the namespace binding context because
it does not contain any qualified names.</p>
</div1>
</body><back>
<div1 id="references">
<head>Normative References</head>
<blist>
<bibl id="Infoset" href="http://www.w3.org/TR/xml-infoset/" key="Infoset">John
Cowan and Richard Tobin, editors. <titleref>XML Information Set</titleref>.
World Wide Web Consortium, 2001.</bibl>
<bibl id="rfc2119" href="http://www.ietf.org/rfc/rfc2119.txt" key="RFC 2119"><titleref>RFC
2119: Key words for use in RFCs to Indicate Requirement Levels</titleref>.
Internet Engineering Task Force, 1997.</bibl>
<bibl id="XML" href="&XML;" key="XML">Tim Bray, Jean Paoli, C.M. Sperberg-McQueen,
and Eve Maler, editors. <emph>Extensible Markup Language (XML) 1.0 (Second
Edition).</emph> World Wide Web Consortium, 2000.</bibl>
<bibl id="draft-xmlmediatypes" href="http://www.ietf.org/rfc/rfc3023" key="RFC 3023"><titleref>RFC
3023: XML Media Types</titleref>. Internet Engineering Task Force, 2001.</bibl>
<bibl id="xptr-framework" href="&xptr-framework-file;" key="XPtrFrame">Paul
Grosso, Eve Maler, Jonathan Marsh, and Norman Walsh, editors. <titleref>XPointer
Framework</titleref>. World Wide Web Consortium, 2002.</bibl>
<bibl id="xsd" href="http://www.w3.org/TR/xmlschema-1/" key="XSD">Henry Thompson
et al., editors. <emph>XML Schema Part 1.</emph> World Wide Web Consortium,
2001.</bibl>
</blist></div1>
</back></spec>

