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

[whatwg] innerHTML in HTML documents with multiple namespaces

From: Thomas Broyer <t.broyer@gmail.com>
Date: Tue, 27 Mar 2007 16:39:05 +0200
Message-ID: <a9699fd20703270739x2f8e2ceeq836c2f0ff198fd27@mail.gmail.com>
Hi,

As announced on the WHATWG-Implementors list, I've done some
preliminary work on HTML5 serializers for Kid and Genshi templating
engines. I'm basing on the algorithm for getting the innerHTML value
<http://www.whatwg.org/specs/web-apps/current-work/#innerhtml0>

I'm actually wondering what is supposed to be "tag name" for an
element which is not in the HTML namespace (e.g. created with
document.createElementNS). Is it the localName or the tagName
(qualified name, i.e. with prefix)?

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);

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

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? (Firefox keeps
uppercase letters; elements created with document.createElement are
HTMLElements and have their names lowercased at creation time; as
described in the spec)

Same questions with attribute names ;-)

-- 
Thomas Broyer
Received on Tuesday, 27 March 2007 07:39:05 UTC

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