[Webkit-unassigned] [Bug 126553] New: createElementNS does not handle 'xmlns' name correctly

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 6 17:10:10 PST 2014


https://bugs.webkit.org/show_bug.cgi?id=126553

           Summary: createElementNS does not handle 'xmlns' name correctly
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: costan at gmail.com


== What steps will reproduce the problem?

1. document.createElementNS('http://www.w3.org/XML/1998/namespace', 'xml:abc', 'foo')
2. document.createElementNS('http://www.w3.org/not-XML/1998/namespace', 'xml:abc', 'foo')

== What is the expected result?

The first line should create an element, the second one should throw a NamespaceError.

== What happens instead?

The first line throws NamespaceError, the second line creates an element.

== Please provide any additional information below.


DOM3 spec: http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-DocCrElNS

NAMESPACE_ERR: Raised if [[irrelevant part removed]] , or if the qualifiedName or its prefix is "xmlns" and the namespaceURI is different from "http://www.w3.org/2000/xmlns/", or if the namespaceURI is "http://www.w3.org/2000/xmlns/" and neither the qualifiedName nor its prefix is "xmlns".

DOM4 spec: http://www.w3.org/TR/dom/#dom-document-createelementns
7. If qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace, throw a "NamespaceError" exception.
8. If namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns", throw a "NamespaceError" exception.

Internet Explorer, Firefox and Chrome match the specification.

I will submit a patch that fixes this bug soon.

-- 
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