<?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 "xmlns">
<!ENTITY shortname "&schemename;">
<!ENTITY dirname "&W3C-path;&doctype;-xptr-&shortname;-&isodate;/">
<!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 correct interpretation of namespace prefixes in pointers.'>
<!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>Steven DeRose</name><affiliation>Brown University Scholarly
Technology Group</affiliation><email href="mailto:Steven_DeRose@Brown.edu">Steven_DeRose@Brown.edu</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>Ron Daniel Jr.</name><affiliation>Interwoven</affiliation><email
href="mailto:rdaniel@interwoven.com">rdaniel@interwoven.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 a subset of
an earlier specification. This specification defines only the &scheme-phrase; that
was defined in the <loc href="http://www.w3.org/TR/2001/CR-xptr-20010911/">XPointer
Candidate Recommendation</loc> published on 11 September 2001.</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>20020425: Initial draft of the xmlns() portion of the specification.</sitem>
<sitem>20020501: Second draft. Added reminder about the xml: namespace.</sitem>
<sitem>20020508: Third draft. Trivially updated the prolog to get ready for
publication. The WG voted to publish this draft.</sitem>
<sitem>20020511: Fourth draft. Minor editorial fixes.</sitem>
<sitem>20020522: Fifth 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; The use of this scheme in a pointer part allows for successful
interpretation of element and attribute names used in pointer parts to the
right when those names use namespace prefixes.</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>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>xmlns() Scheme Syntax</head>
<prod id="NT-xmlnsschemedata">
<lhs>&schemename;schemedata</lhs><rhs><xnt href="&XMLNames;/#NT-NCName">NCName</xnt> <xnt
href="&XML;#NT-S">S</xnt>? '=' <xnt href="&XML;#NT-S">S</xnt>? <nt def="NT-NsURIRef">NsURIRef</nt></rhs>
</prod>
<prod id="NT-NsURIRef">
<lhs>NsURIRef</lhs><rhs><xnt href="&XML;#NT-Char">Char</xnt>*</rhs>
</prod>
</scrap>
<p><xnt href="&XML;#NT-S">S</xnt> is as defined in the XML specification <bibref
ref="XML"/>, and <xnt href="&XMLNames;/#NT-QName">NCName</xnt> is as defined
in the XML Namespaces specification <bibref ref="XML-Names"/>.</p>
<p>A pointer part with the &scheme-phrase; declares a namespace prefix (<xnt
href="&XMLNames;/#NT-QName">NCName</xnt>) to be associated with an XML namespace
(<kw>NsURIRef</kw>). Each pointer part that uses the &scheme-phrase; contributes
a new entry to the namespace binding context, and serves to allow successful
interpretation of element and attribute names used in pointer parts to the
right when those names use namespace prefixes. 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 <kw>abc</kw> prefix to
the <kw>http://example.com/ns/abc</kw> namespace name:</p>
<eg>xmlns(abc=http://example.com/ns/abc)</eg>
<p>A pointer part that uses the &scheme-phrase; never identifies a subresource
and thus always fails. However, its evaluation has a potential effect on pointer
parts to its right. </p>
<p>If the pointer part fails due to failure to conform to the syntax described
in this specification, it does not contribute an entry to the namespace binding
context.</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 &scheme-phrase; to
redefine the <code>xml</code> prefix will result in no change to the namespace
binding context.</p>
<p>The prefixes used in pointer parts need not match the prefixes actually
used in the XML resource into which the pointer part is addressing. As an
example, assume the following target XML resource:</p>
<eg>&lt;doc>
   &lt;x:a xmlns:x="http://example.com/foo">
     &lt;x:a xmlns:x="http://example.org/bar">This element and
     its parent are in different namespaces.&lt;/x:a>
   &lt;/x:a>
&lt;/doc></eg>
<p>Evaluation of a pointer part that refers to element <el>x:a</el> will fail
if the namespace binding context contains no entry that binds <kw>x</kw> to
a namespace name. The following two pointer parts allow pointer parts to the
right to refer to both the outer <el>a</el> element (as <el>x:a</el>) and
the inner element (as <el>y:a</el>):</p>
<eg>xmlns(x=http://example.com/foo) xmlns(y=http://example.org/bar)</eg>
</div1>
</body><back>
<div1 id="references">
<head>Normative References</head>
<blist>
<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="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="XML-Names" xmlns:xlink="http://www.w3.org/1999/xlink" href="&XMLNames;/"
key="XML-Names">Tim Bray, Dave Hollander, and Andrew Layman, editors.  <titleref>Namespaces
in XML</titleref>. World Wide Web Consortium, 1999.</bibl>
</blist></div1>
</back></spec>

