W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2007

[whatwg] innerHTML in HTML documents with multiple namespaces

From: Asbjørn Ulsberg <asbjorn@ulsberg.no>
Date: Mon, 02 Apr 2007 12:30:13 +0200
Message-ID: <op.tp5jgntf5rel5w@quark>
On Tue, 27 Mar 2007 16:39:05 +0200, Thomas Broyer <t.broyer at gmail.com>  

> In other words, what should document.body.innerHTML end with after this  
> script: var svg_svg =  
> document.createElementNS("http://www.w3.org/2000/svg",
> "svg:svg"); document.body.appendChild(svg_svg);

As long as the result stays well-formed and qualified, does it really  

> Should it end with "<svg></svg>" or "<svg:svg></svg:svg>"? (Firefox
> would have "<svg></svg>")

Imo, it would be <svg xmlns="http://www.w3.org/2000/svg"></svg> or  
<svg:svg xmlns:svg="http://www.w3.org/2000/svg"></svg:svg>. The  
deserialization of those XML fragments produce the same DOM and are thus  
equal. If the namespace URI is already defined somewhere in the DOM, I  
suppose the registered prefix should be used instead.

> Also, should the "tag name" be lowercased before inclusion in the
> output or the algorithm is just assuming the "tag name" of HTML
> elements have already been lowercased elsewhere?

I think that non-XHTML elements should stay "as entered".

> Same questions with attribute names ;-)

Same answer, imo. :)

Asbj?rn Ulsberg           -=|=-        asbjorn at ulsberg.no
?He's a loathsome offensive brute, yet I can't look away?
Received on Monday, 2 April 2007 03:30:13 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:54 UTC