W3C

XPointer xmlns() Scheme

W3C Proposed Recommendation 13 November 2002

This version:
http://www.w3.org/TR/2002/PR-xptr-xmlns-20021113/
Latest version:
http://www.w3.org/TR/xptr-xmlns/
Previous version:
http://www.w3.org/TR/2002/WD-xptr-xmlns-20020710/
Editors:
Steven J. DeRose <sderose@acm.org>
Ron Daniel Jr. <rdaniel@taxonomystrategies.com>
Eve Maler, Sun Microsystems <eve.maler@sun.com>
Jonathan Marsh, Microsoft <jmarsh@microsoft.com>

This document is also available in these non-normative formats: XML.


Abstract

The XPointer xmlns() scheme is intended to be used with the XPointer Framework [XPtrFrame] 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.

Status of this Document

This document is a Proposed Recommendation (PR) of the W3C. This document has been produced by the W3C XML Linking Working Group as part of the XML Activity. It is intended to address a subset of the original XPointer requirements, and to serve as a possible part of a recommendation to the IETF for a fragment identifier syntax for the XML Mime types.

W3C Advisory Committee Members are invited to send formal review comments to the W3C Team until 13 December 2002 at team-xptr-review@w3.org. The public is invited to send comments to the public mailing list www-xml-linking-comments@w3.org (archive). 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.

This document is based upon the XPointer Candidate Recommendation 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 XPointer Framework, the XPointer element() Scheme, the XPointer xmlns() scheme (this specification), and the XPointer xpointer() scheme. This specification subsequently went through an additional Last Call 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 previous Implementation Report, and thus that a further Candidate Recommendation period is not necessary. Information about more recent implementations of subsets relevant to this specification and the XPointer element() Scheme and XPointer Framework can be found in the new Implementation Report. Other specifications such as XInclude 1.0 already make normative references to this specification, which makes timely progression to Recommendation desirable.

There are patent disclosures and license commitments associated with this working draft, which may be found on the XPointer IPR Statement page in conformance with W3C policy.

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 http://www.w3.org/TR/.

Table of Contents

1 Introduction
2 Conformance
3 Language and Processing

Appendices

A Normative References
B Non-Normative References (Non-Normative)


1 Introduction

The XPointer xmlns() scheme is intended to be used with the XPointer Framework [XPtrFrame] 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.

[Definition: The key words must, must not, required, shall, shall not, should, should not, recommended, may, and optional in this specification are to be interpreted as described in [RFC 2119].]

The terms pointer part, scheme, XPointer processor, and namespace binding context are used in this specification as defined in the XPointer Framework specification.

The formal grammar for the xmlns() scheme is given using simple Extended Backus-Naur Form (EBNF) notation, as described in the XML Recommendation [XML].

2 Conformance

This specification normatively depends on the XPointer Framework [XPtrFrame] specification.

Conforming XPointer processors claiming to support the xmlns() scheme must conform to the behavior defined in this specification and may conform to additional XPointer scheme specifications.

3 Language and Processing

This section describes the syntax and semantics of the xmlns() scheme and the behavior of XPointer processors with respect to this scheme.

The scheme name is "xmlns". The scheme data syntax is as follows; if scheme data in a pointer part with the xmlns() scheme does not conform to the syntax defined in this section the pointer part does not contribute an entry to the namespace binding context.

xmlns() Scheme Syntax
[1]   XmlnsSchemeData   ::=    NCName S? '=' S? EscapedNamespaceName
[2]   EscapedNamespaceName   ::=    EscapedData*

S is as defined in the XML specification [XML], NCName is as defined in the XML Namespaces specification [XML-Names], and EscapedData is as defined in the XPointer Framework specification [XPtrFrame].

A pointer part with the xmlns() scheme declares a namespace prefix (NCName) to be associated with an XML namespace name (EscapedNamespaceName with any circumflex-escaping undone). Each pointer part that uses the xmlns() 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.

For example, the following pointer part binds the abc prefix to the http://example.com/ns/abc namespace name:

xmlns(abc=http://example.com/ns/abc)

A pointer part that uses the xmlns() scheme never identifies a subresource and thus the XPointer processor evaluation always continues with the next pointer part. However, evaluation of the xmlns pointer part has a potential effect on pointer parts to its right.

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 xml prefix bound to the URI http:/www.w3.org/XML/1998/namespace. Following the rules specified by the Framework, any attempt by a pointer part using the xmlns() scheme to redefine the xml prefix will result in no change to the namespace binding context. Any attempt to bind a prefix to the namespace name http://www.w3.org/XML/1998/namespace will result in no change to the namespace binding context. Any attempt to define the xmlns prefix will result in no change to the namespace binding context. Any attempt to bind a prefix to the namespace name http://www.w3.org/2000/xmlns/ will result in no change to the namespace binding context.

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:

<customer xmlns="http://example.org/customer">
   <name xmlns="http://example.org/personal-info">John Doe</name>
</customer>

Evaluation of a pointer part that refers to element customer will not identify any subresources if the namespace binding context contains no entry that binds a prefix to the namespace name http://example.org/customer. The following two pointer parts allow the xpointer() [XPointer] part to the right to refer to the customer element (as c:customer) and the name element (as p:name):

xmlns(c=http://example.org/customer) xmlns(p=http://example.org/personal-info)
xpointer(/c:customer/p:name)

A Normative References

RFC 2119
Scott Bradner, RFC 2119: Key words for use in RFCs to Indicate Requirement Levels. Internet Engineering Task Force, 1997.
XML
Tim Bray, Jean Paoli, C.M. Sperberg-McQueen, and Eve Maler, editors. Extensible Markup Language (XML) 1.0 (Second Edition). World Wide Web Consortium, 2000.
XPtrFrame
Paul Grosso, Eve Maler, Jonathan Marsh, and Norman Walsh, editors. XPointer Framework. World Wide Web Consortium, 2002.
XML-Names
Tim Bray, Dave Hollander, and Andrew Layman, editors. Namespaces in XML. World Wide Web Consortium, 1999.

B Non-Normative References (Non-Normative)

XPointer
Steve DeRose, Eve Maler, and Ron Daniels, editors. XPointer xpointer() Scheme. World Wide Web Consortium, 2002. Work in progress.