W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2015

RE: template namespace attribute proposal

From: Travis Leithead <travis.leithead@microsoft.com>
Date: Thu, 12 Mar 2015 18:25:26 +0000
To: Adam Klein <adamk@chromium.org>, Benjamin Lesh <blesh@netflix.com>
CC: WebApps WG <public-webapps@w3.org>
Message-ID: <BLUPR03MB3892061ED75BC963B814EC4F8060@BLUPR03MB389.namprd03.prod.outlook.com>
I would also prefer to enable this to work without any extra annotation. So much of the rest of how SVG/MathML are handled in HTML is seamless by design.

From: adamk@google.com [mailto:adamk@google.com] On Behalf Of Adam Klein
Sent: Thursday, March 12, 2015 11:17 AM
To: Benjamin Lesh
Cc: WebApps WG
Subject: Re: template namespace attribute proposal

On Wed, Mar 11, 2015 at 8:32 PM, Benjamin Lesh <blesh@netflix.com<mailto:blesh@netflix.com>> wrote:
I'd like to propose that the <template> tag have a namespace="" attribute that allows the user to specify namespaces such as "http://www.w3.org/2000/svg", so that the document fragment that comes from `.content` is created properly.


<template id="my-svg-template" namespace="http://www.w3.org/2000/svg>
  <circle cx="10" cy="10" cr="10"/>

For clarity, is this significantly different from the below (which works today)?

<template id="tmpl">
    <circle .../>

Clearly there's an extra step here, in that accessing the SVG elements requires hopping into firstElementChild, but adding new namespace-related features seems unfortunate.

- Adam
Received on Thursday, 12 March 2015 18:25:53 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:44 UTC