Summary: | setAttributeNode behavior when node was created with createAttributeNS | ||
---|---|---|---|
Product: | WebKit | Reporter: | Robert Sayre <rsayre> |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | Normal | CC: | ap, cdumez, gavin.sharp, jwalden+bwo |
Priority: | P2 | ||
Version: | 523.x (Safari 3) | ||
Hardware: | Mac | ||
OS: | OS X 10.4 |
Description
Robert Sayre
2007-02-24 15:35:55 PST
I believe WebKit is correct when preserving the namespace in setAttributeNode(). As you mention in your b.m.o report, the spec doesn't say what setAttributeNode() does for namespaced attributes. However, there is a non-normative note that seems to make the intention clear, see section 1.1.8 of DOM 2 Core (or section 1.3.3 of DOM 3 Core): ---------------------------------------------- Similarly, using Element.setAttributeNode(newAttr), one can set two attributes (or more) that have different Node.nodeNames but the same Node.prefix and Node.namespaceURI. In this case Element.getAttributeNodeNS(namespaceURI, localName) will return either attribute, in an implementation dependent manner. The only guarantee in such cases is that all methods that access a named item by its nodeName will access the same item, and all methods which access a node by its URI and local name will access the same node. ---------------------------------------------- So it appears that Firefox is the only modern browser that disagrees with the (non-normative) spec text here. As real life compatibility risk seems to be pretty low, I'm closing this bug as INVALID. Mass moving XML DOM bugs to the "DOM" Component. |