[Home] [By Thread] [By Date] [Recent Entries]


Hi,

> The XML Namespaces Recommendation says that the default namespace
> applies only to elements, and not to attribues
> (http://www.w3.org/TR/REC-xml-names/#defaulting).
>
> i.e. an unprefixed attribute name will always be in the null  
> namespace.
>
> I am curious to know why this is so?

This has a long history and debate. I think the original explanation  
was that the authors of the spec thought of attributes being like  
local variables in C++ (who don't have a namespace either) or  
something like that. Many people believe that this was a big mistake  
as it complicates both applications and the general understanding of  
namespaces without any benefit.

Regards,
Martin

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member