Re: XHTML attributes and namespace, clarification needed

Bjoern Hoehrmann wrote:

> requirement has been avoided. Or is your question why the XML Namespaces
> specification does not consider attributes without prefix to be in the
> namespace of the element they are attached to?

I am maybe naive but it seems to me natural to make the foo attribute in <bar
foo="truc"> inherit its namespace from the element that carries it. And foo
would have no namespace if bar has not namespace.
I understand perfectly why we need namespaceless elements and attributes. But
I don't feel XHTML attributes fall into that case. XHTML user agents recognize
XHTML attributes as defined by the XHTML language, they act as if they were
belonging to the XHTML namespace. Keeping XHTML attributes namespaceless means
a semantic hack in user agents: "Oh, this has no namespace but it's an XHTML
attribute, so we know what to do with it". In other terms, user agents act as
if they had a hardcoded namespace for these attributes.

In my opinion, we probably need a mechanism defining a default namespace for
BOTH elements and attributes. And that's that one XHTML should use instead of


Received on Tuesday, 14 December 2004 12:58:14 UTC