Review of the <template> spec

I reviewed http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html#dfn-template
. Sorry about the delay.

Comments:

XML parsing isn’t covered. (Should have the wormhole per the
discussion at TPAC.)

XSLT output isn’t covered. (When an XSLT program trying to generate a
template element with children, the children should go through the
wormhole.)

Interaction with the DOM to XDM mapping isn’t covered per discussion
at TPAC. (Expected template contents not to appear in the XDM when
invoking the XPath DOM API (for consistency with querySelectorAll) but
expected them to appear in the XDM when an XSLT transformation is
being processed (to avoid precluding use cases).)

> 1. If DOCUMENT does not have a browsing context, Let TEMPLATE CONTENTS OWNER be DOCUMENT and abort these steps.
> 2. Otherwise, Let TEMPLATE CONTENTS OWNER be a new Document node that does not have a browsing context.

Is there a big win from this inconsistency? Why not always have a
separate doc as the template contents owner?

Do we trust the platform never to introduce a way to plant a document
that does not have a browsing context into a browsing context?
(Unlikely, but do we really want to make the bet?)

-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/

Received on Tuesday, 11 December 2012 13:00:45 UTC