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:184.108.40.206) Gecko/20060111 Firefox/220.127.116.11 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
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
Last Resolved: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.