Cover Pages Logo SEARCH
Advanced Search
ABOUT
Site Map
CP RSS Channel
Contact Us
Sponsoring CP
About Our Sponsors

NEWS
Cover Stories
Articles & Papers
Press Releases

CORE STANDARDS
XML
SGML
Schemas
XSL/XSLT/XPath
XLink
XML Query
CSS
SVG

TECHNOLOGY REPORTS
XML Applications
General Apps
Government Apps
Academic Apps

EVENTS
LIBRARY
Introductions
FAQs
Bibliography
Technology and Society
Semantics
Tech Topics
Software
Related Standards
Historic

XML Namespace Specification


Date:     Mon, 01 Feb 1999 10:03:50 -0800
From:     Tim Bray <tbray@textuality.com>
To:       james anderson <James.Anderson@mecomnet.de>, XML Dev <xml-dev@ic.ac.uk>
Subject:  Re: Another errata?

At 06:35 PM 2/1/99 +0100, james anderson wrote:

>While I could live with the assertion, I would, unfortunately, be unable to
>write useful software which conformed to it. If an "unprefixed attribute name"
>is really not in any namespace, then it would be impossible for application
>code to execute an affirmative comparison against the name, and it would be,
>for similar reasons, impossible to write xsl patterns which addressed the
>attribute. Are these consequences really intended?

The namespace spec gets more over-interpretation than any document this side of the Old Testament. It seems simple to me.

  1. There are abstract things called "namespaces", each identified by some URI

  2. There is a syntactic mechanism, involving reserved attributes, placeholder tokens, and colon-delimited prefixes

  3. The mechanism can be used to map namespaces directly to element types

  4. The mechanism can be used to map namespaces directly to attribute names

  5. There is a defaulting mechanism to map namespaces to unprefixed element types, purely syntactic sugar

The spec says nothing normative about the relationship between namespaces, as defined in #1, and an unprefixed attribute.

Appendix A provides a scheme which can be used to create a unique identifier for each element type & attr name in a document, using in part the namespace information.

If it's any consolation, this very issue was more or less what tied up the WG for months and months. What really crystallizes it is the question, given this:

<html:a href="fooo">

what can you say about the namespace of the href= attribute? The most common and reasonable-sounding answer is, "it's in the namespace of the html:a element". OK, but what does that mean, formally? It turns out to be hard to write down. You could decree that it's in the HTML namespace. A consequence of this is that

<html:a href="foo"> is identical to
<html:a html:href="foo">

which it might be in some circumstances; but always, for all element types and all namespaces? Tough to buy into.

Anyhow, the final consensus was that all you can say about the href= above is that it's attached to an element that's in the html namespace. For the purposes of many applications, that might be equivalent to being in the html namespace; but that interpretation isn't compulsory. For places where you want it to be compulsory, go on and prefix the attributes.

In my first few implementations of namespace-savvy software, I've had no trouble finding the attributes I needed. What's a scenario that causes problems? -Tim


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)

Prepared by Robin Cover for the The SGML/XML Web Page archive. For more on XML Namespaces, see the section Namespaces in XML.


Globe Image

Document URL: http://xml.coverpages.org/namespacesBray19990201.html