Closed Bug 343470 Opened 18 years ago Closed 18 years ago

xmlns null in createElementNS call should create an element in no namespace

Categories

(Core :: DOM: Core & HTML, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 301260

People

(Reporter: geckobugs, Unassigned)

References

()

Details

Attachments

(1 file)

User-Agent:       Opera/9.00 (Windows NT 5.1; U; en)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1

calling createElementNS(null, 'foo') should create a "foo" element in no namespace. If added to an element with a defined namespace and serialized, the element should have an xmlns="" attribute to express that it is in no namespace.

Reproducible: Always
Attached file testcase
I think this is actually a bug in the XMLSerializer, and not in the core DOM code.  The alert demonstrates that el does have a null namespace and null prefix (which is somewhat okay for DOM use).  I also think you're right in that the serialized version should have something different.  I won't confirm it yet, though, because I'm not 100% sure.

Also reference bug 312019, which deals with a lookupNamespaceURI / lookupPrefix bug.  It might be related somewhat (I don't know how the serializer does its work).

*** This bug has been marked as a duplicate of 301260 ***
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
Component: DOM: Core → DOM: Core & HTML
QA Contact: ian → general
Assignee: general → nobody
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: