Re: Behavior of namespace during appendChild

* Gerwin Jansen wrote:
>1) What should be the result of appending 'child' in
><root><child/></root> to <newparent xmlns="q"/> ?
>a) <newparent xmlns="q"/><child/></newparent>
>b) <newparent xmlns="q"/><child xmlns=""/></newparent>
>
>2) And what should be the result of appending 'child' in
><root xmlns=""><child/></root> to <newparent xmlns="q"/> ?
>a) <newparent xmlns="q"/><child/></newparent>
>b) <newparent xmlns="q"/><child xmlns=""/></newparent>

Only Document.renameNode can change the namespaceURI of localName of a
node, and serialization is expected to maintain the right names, so in 
both cases the answer is "b".
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Received on Monday, 31 October 2011 16:22:54 UTC