[Bug 25062] New: Add specialized serialization requirements for element namespaces in XML/XMLNS

[email protected]
Newsgroups gmane.comp.web.dom.general
Message-ID <[email protected]/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=25062

            Bug ID: 25062
           Summary: Add specialized serialization requirements for element
                    namespaces in XML/XMLNS
           Product: WebAppsWG
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DOM Parsing and Serialization
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected], [email protected]

Some notes, while I was working on bug 24208:

Firefox-as-reference:
"<xml:div/>" == new
XMLSerializer().serializeToString(document.createElementNS("http://www.w3.org/XML/1998/namespace",
"foot:div"));

* "xml" prefix trumps actual prefix for nodes in the XML namespace in the XML
Serializer.
(Same goes for nested elements with XML namespace:
...appendChild(document.createElementNS("http://www.w3.org/XML/1998/namespace",
"toe:span"));
"<xml:div><xml:span/></xml:div>" -- XMLSerializer
"<foot:div><toe:span></toe:span></foot:div>" -- HTML Serializer uses QName

Per DOM4:
* XMLNS is tightly controlled (reserved) via createElementNS -- prefix/QName
<-must match-> namespace
* XML prefix -> XML namespace is controlled (reserved), but not vice-versa. 

Possible cases to handle:
"<xmlns:div/>" == new
XMLSerializer().serializeToString(document.createElementNS("http://www.w3.org/2000/xmlns/",
"xmlns:div"));
"<xmlns xmlns="http://www.w3.org/2000/xmlns/"/>" == new
XMLSerializer().serializeToString(document.createElementNS("http://www.w3.org/2000/xmlns/",
"xmlns"));
* ASSERT: Follows generic serializer rules with regard to expansion/prefix use.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.