W3C home > Mailing lists > Public > public-html@w3.org > June 2008

Re: innerHTML in XML

From: Ian Hickson <ian@hixie.ch>
Date: Sun, 1 Jun 2008 10:57:36 +0000 (UTC)
To: Cameron McCormack <cam@mcc.id.au>
Cc: public-html@w3.org
Message-ID: <Pine.LNX.4.62.0806011052490.504@hixie.dreamhostps.com>
On Sun, 1 Jun 2008, Cameron McCormack wrote:
> 
> Currently the spec says:
> 
>   If any of the elements in the serialization are in the null namespace,
>   the default namespace in scope for those elements must be explicitly
>   declared as the empty string.
>    — http://dev.w3.org/html5/spec/#innerhtml1
> 
> Is there any reason for this?

If we didn't do this, round-tripping would break. For example this:


    <foo xmlns="a:"><bar xmlns=""/></foo>

    foo.innerHTML = foo.innerHTML;

...would turn the DOM into the equivalent of:

    <a:foo xmlns:a="a:"><a:bar/></a:foo>


> Also, there are a few mentions of elements/attributes being “in the 
> null namespace”, which strictly should be “in no namespace”.

Fixed.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Sunday, 1 June 2008 10:58:15 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:38:55 UTC