Serializing the following document works: <x xmlns="a" xmlns:b="b"> <element b:attr="value"/> </x> However, if you create "element" with Javascript using createElementNS and setAttributeNS, then the serialized output is <element xmlns="a" attr="value" xmlns="b">
*** This bug has been marked as a duplicate of bug 22958 ***