Question on sXBL and ownerDocument

I was looking at the sXBL draft and noticed that the shadow nodes' ownerDocument 
points to the sXBL document.  As a result, one can have nodes which have 
ownerDocument set to a document that they are not really "in" (in the sense that 
traversing the parentNode chain will never reach it).

I understand the reasons for this decision, and I agree with them, but it does 
lead to some ambiguities in interpreting certain constructs.  I'll be sending 
more mail on this when and if I run into these issues, but for a start consider 
the following scenario:

<template> "contains child nodes that can be in any namespace".  Say I have an 
<xhtml:img> in the template that has a usemap attribute set.  Where should the 
<xhtml:map> element be searched in?  The sXBL document, or the ownerDocument of 
the element that the binding is attached to?

I'm leaning towards searching in the sXBL document, since the shadow content 
should not be making assumptions about the structure of the document it's 
attached to... is that correct?

-Boris

Received on Wednesday, 6 October 2004 16:40:12 UTC