"xnlns" node attribute removed when using XMLHttpRequest.send( document ) [ or XMLSerializer.serializeToString( node ) ] in firefox 3

[email protected] Fri, 7 Dec 2007 08:28:56 -0800 (PST)
Newsgroups gmane.comp.mozilla.devel.xml
Organization http://groups.google.com
Message-ID <7b463a15-7385-46b5-87f5-7838c4bede50@e23g2000prf.googlegroups.com>
Maybe this belongs in the javascript section but here we go anyway.

I've been working on getting my  javascript code compatable with
Firefox 3 and ran into a problem.
I am switching alot of code blocks from:

appendNode( node );

to something similar to:

var newNode = document.importNode( node, true );
appendNode ( newNode );

to comply with the new strict enforcement of  "nodes cannot be owned
by two different documents" in firefox 3 (gecko 1.9).

The problem am I running into is that when sending a document via AJAX
using XMLHttpRequest.send( document ) method it looks like the
appended node is losing it's "xmlns" attribute when undergoing
serialization. This can also be reproduced by using
XMLSerializer.serializeToString( node ) call.

Running the same code in firefox 2 doesn't cause this issue.

So my question is, what's changed in firefox 3? What do I have to do
to maintain the "xmlns" attribute on this appended node when sending
via XMLHttpRequest?

I can throw together a test example if it is necessary.