W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2011

Re: Behavior of namespace during appendChild

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Mon, 31 Oct 2011 17:22:27 +0100
To: Gerwin Jansen <gjansen@cordys.com>
Cc: www-dom@w3.org
Message-ID: <nkita7t9a90m2afs21fss2hjv10t96ja2n@hive.bjoern.hoehrmann.de>
* 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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:08 GMT