The Disposition of Names in an XML Namespace

W3C Working Draft 29 March 2006

This version:
Latest version:
Norman Walsh, Sun Microsystems, Inc. <Norman.Walsh@Sun.COM>

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


A finding of the W3C Technical Architecture Group (TAG), this document addresses the question of whether or not adding new names to a (published) namespace is a sound practice.

Status of this Document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.

This is a First Public Working Draft produced by the W3C Technical Architecture Group (TAG). Approved by the TAG at its 3 January 2006 teleconference, this finding on TAG issue nameSpaceState-48 addresses just one of many TAG issues. The eventual disposition of this text is not clear—one possibility is it being integrated with other TAG findings into a new or a second volume of Architecture of the World Wide Web.

Please send comments on this finding to the publicly archived TAG mailing list www-tag@w3.org (archive).

Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.

This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.

Table of Contents

1 Preface
2 Namespace Definitions
3 References

1 Preface

Namespaces are a mechanism for managing names in a distributed way that greatly reduces the likelihood that two independent parties will create the same name for different purposes.

An XML namespace has a namespace name (a URI) and a set of local names (NCNames as defined in [XML Namespaces]). Using a URI leverages the well-understood URI allocation mechanisms of [WebArch Vol 1]. [XML Namespaces] defines a syntactic shorthand for the combination of a namespace name and a local name: the qualified name, or “QName”. (Note that languages which use QNames as identifiers are required to provide a mapping from QNames to URIs.)

The proposal to define a new local name, “id”, in the namespace “http://www.w3.org/XML/1998/namespace” (the xml: namespace) raised a question about the identity of a namespace. Concretely, it exposed two perspectives:

  1. One perspective was that the xml: namespace consisted of xml:space, xml:lang, and xml:base (and no other names) because there was a point in time in which those where the only three names from that namespace that had a defined meaning.

  2. The other perspective was that the xml: namespace consisted of all possible local names and that only a finite (but flexible) number of them are defined at any given point in time.

Colloquially, we often speak of “adding a name” to a namespace. Here we prefer to speak of “defining a name” or otherwise licensing the interpretation of a name. For example, the [xml:id] specification defines the meaning of the local name “id” in the xml: namespace. Similarly, a namespace created to hold the names of all the reserved words in a programming language would license the interpretation of those QNames without explicitly defining each of them.

The terms MUST, SHOULD, and SHOULD NOT are used in this document in accordance with [RFC 2119].

2 Namespace Definitions

The publication of [xml:id] as a Recommendation, provided a partial answer to the question of which perspective is correct. Adding a definition for the local name “id” in the xml: namespace demonstrated that the number of local names defined in the xml: namespace could be extended.

The question remains, however, as to whether the other position is ever sound. This Finding takes the position that it is.

Namespaces, originally designed to provide names for XML elements and attributes, have been adopted much more broadly by the web community. They are now used not simply for elements and attributes but for function names, tokens, and identifiers for ever more purposes.

The xml: namespace demonstrates that some namespaces benefit from a policy that allows additional names to be defined in them over time. This does not preclude the possibility that some namespaces would benefit from a policy that forbids such extension. From these observations, we conclude that the following good practice applies:

Good Practice

Specifications that define namespaces SHOULD explicitly state their policy with respect to changes in the names defined in that namespace.

For namespaces that are not immutable, the specification SHOULD describe how names may be given definitions (or have them removed) and by whom.

If a namespace document is provided, as [WebArch Vol 1] recommends, the namespace change policy SHOULD be stated in the namespace document.

As a general rule, resources on the web can and do change. In the absence of an explicit statement, one cannot infer that a namespace is immutable.

3 References

RFC 2119
S. Bradner. Key words for use in RFCs to Indicate Requirement Levels. IETF. March, 1997. (See http://www.ietf.org/rfc/rfc2119.txt.)
XML Namespaces
Tim Bray, Dave Hollander, Andrew Layman, editors. Namespaces in XML. World Wide Web Consortium, 1999. (See http://www.w3.org/TR/REC-xml-names/.)
WebArch Vol 1
Ian Jacobs and Norman Walsh, editors. Architecture of the World Wide Web, Volume 1. World Wide Web Consortium, 2004. (See http://www.w3.org/TR/webarch/.)
Jonathan Marsh, Daniel Veillard, and Norman Walsh, editors. xml:id Version 1.0. World Wide Web Consortium, 2005. (See http://www.w3.org/TR/xml-id/.)