[Webkit-unassigned] [Bug 117394] New: DOMSerializer creates invalid XML when setAttributeNS() has been used
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jun 10 00:56:48 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=117394
Summary: DOMSerializer creates invalid XML when
setAttributeNS() has been used
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
URL: http://jsfiddle.net/c4jBw/
OS/Version: Unspecified
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: XML DOM
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: zupftom at googlemail.com
== Overview ==
When serializing a document where attributes have been added using .setAttributeNs(), the serialization is invalid XML.
== Steps to Reproduce ==
Execute the following code:
var doc = (new DOMParser()).parseFromString("<test xmlns='http://www.example.com'/>","text/xml");
doc.documentElement.setAttributeNS("http://www.w3.org/XML/1998/namespace","id","abc");
doc.documentElement.setAttributeNS("http://www.example.com/dummy/namespace","foo","bar");
console.log((new XMLSerializer()).serializeToString(doc));
(can be found at http://jsfiddle.net/c4jBw/)
== Actual Results ==
<test xmlns="http://www.example.com" id="abc" xmlns="http://www.w3.org/XML/1998/namespace" foo="bar" xmlns="http://www.example.com/dummy/namespace"/>
== Expected Results ==
<test xmlns="http://www.example.com" xml:id="abc" a0:foo="bar" xmlns:a0="http://www.example.com/dummy/namespace"/>
== Software Version ==
First encountered with Safari 5.1.7 (7534.57.2) on Windows 7
== Additional Comments ==
The main problem are three xmlns attributes. The second problem is that the added attributes are in the null namespace.
The correct example output is taken from Firefox 21.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list