tbray at textuality.com
Mon Feb 1 18:05:15 GMT 1999
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
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
4. The mechanism can be used to map namespaces directly to
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:
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
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
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 at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
More information about the Xml-dev