Re: Review of the spec

2012-12-13 Thread Jonas Sicking
On Tue, Dec 11, 2012 at 5:00 AM, Henri Sivonen  wrote:
>> 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?

Or why not always use the owner document of the  element?
Documents are fairly heavy-weight and introducing several documents
into the mix means that we have to deal with issues like making sure
that those documents have the same behavior (for example, if HTML
elements in those documents uppercase the nodeName or not)

/ Jonas



Re: Review of the spec

2012-12-13 Thread Robin Berjon

On 11/12/2012 14:00 , Henri Sivonen wrote:

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


I don't recall (and can't seem to find) the reasoning behind this 
distinction. It seems rather costly to require two different code paths 
for XPath handling, especially when you consider how much this actually 
gets used.


--
Robin Berjon - http://berjon.com/ - @robinberjon