Another errata?

Ronald Bourret rbourret at ito.tu-darmstadt.de
Mon Feb 1 14:16:57 GMT 1999


Tim Bray wrote:

> I repeat: in the sense the spec uses  the word namespace, an unprefixed
> attribute is NOT IN ANY NAMESPACE.

I'm happy to live with this interpretation -- it's just that it comes as a 
complete surprise to me (and apparently to others as well).  In this 
respect, how anybody can read A.2 and determine that prefixed attributes 
belong to a namespace and unprefixed attributes do not belong to a 
namespace is beyond me.

One very important consequence of this interpretation is that 
namespace-aware applications need to be sure they don't look for 
namespace-prefixed local attribute names and namespace-aware SAX and DOM 
implementations need to be careful that the namespace name passed for local 
attributes is null.

Although it's probably too late, a clarification would be welcome, 
especially since I can find nothing outside of A.2 that talks about whether 
attributes (prefixed or unprefixed) belong to a namespace. For example, the 
first paragraphs of 5.1 and 5.2 state that:

"The namespace declaration is considered to apply to the element where it 
is specified and to all elements within the content of that element..."

and:

"A default namespace is considered to apply to the element where it is 
declared (if that element has no namespace prefix), and to all elements 
with no prefix within the content of that element. ... Note that default 
namespaces do not apply directly to attributes."

This clarifies that default namespaces do not apply to attributes, but does 
not tell us anything about what does apply to attributes, prefixed or not. 
 I suggest changing the first paragraph of 5.1 to the following:

"The namespace declaration is considered to apply to the element **and all 
prefixed attributes** where it is specified and to all elements **and 
prefixed attributes** within the content of that element, unless overridden 
by another namespace declaration with the same NSAttName part. **Namespace 
declarations do not apply to unprefixed attributes.**"

-- Ron Bourret


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;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list