Re: setAttributeNS(): should it change the namespace prefix?

On 11/29/11 1:17 PM, David Flanagan wrote:
> That's how I implemented it in dom.js, and it made my attribute code and
> data structures more complicated than they would have been otherwise. If
> I'm not mistaken, it is that one step in this one method that allows an
> element to have multiple attributes with the same qualified name.

That's not the issue Anne's asking about.  I believe that all UAs 
support attributes with the same qualified name in different namespaces, 
and the DOM2 spec, on its face, seems to require such support.

> So this one method causes the specs for all the other attribute methods to
> have to say "...the first attribute in the context object's attributes
> whose name is..." instead of "...the attribute whose name is..."

You mean all the namespace-unaware attribute methods, right?

> Making the change would simplify the spec and simplify implementations
> and presumably (given Opera and Webkit) wouldn't have much web
> compatibility impact, so I'm for it.

You're talking about a different issue than Anne is.  He's talking about 
what happens when a different qualified name is used for the same 
namespace+localname pair.  You're talking about what happens when the 
same qualified name is used for different namespace+localname pairs.

-Boris

Received on Tuesday, 29 November 2011 18:26:21 UTC