W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2012

Re: Making <template> play nice with XML and tags-and-text

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 18 Jul 2012 17:43:23 +0000 (UTC)
To: Adam Barth <w3c@adambarth.com>
cc: WebApps WG <public-webapps@w3.org>, Henri Sivonen <hsivonen@iki.fi>, Adam Klein <adamk@chromium.org>, Rafael Weinstein <rafaelw@chromium.org>
Message-ID: <Pine.LNX.4.64.1207181739170.27616@ps20323.dreamhostps.com>
On Wed, 18 Jul 2012, Adam Barth wrote:
> Inspired by a conversation with hsivonen in #whatwg, I spend some time 
> thinking about how we would design <template> for an XML world.  One 
> idea I had was to put the elements inside the template into a namespace 
> other than http://www.w3.org/1999/xhtml.

Interesting idea.

To handle multiple namespaces (specifically SVG and MathML), we could say 
that "inert" namespaces are namespaces that start with or end with a 
particular prefix, e.g. that are in the inert: scheme or that end with 
#inert. Then to de-inert nodes, you just strip the relevant part of the 
namespace string when cloning.

To make this work in HTML with nested namespaces might be interesting:


I guess what we do in the HTML parser is have it use all the same 
codepaths as now, except the "create an element" operations check if 
there's a <template> on the stack, and if there is, then they add the 
inert marker to the namespace, but everything else in the parser acts as 
if the marker is not there?

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 18 July 2012 17:43:46 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:37 UTC