W3C home > Mailing lists > Public > www-svg@w3.org > July 2005

Re: Shadow tree generation

From: Jon Ferraiolo <jonf@adobe.com>
Date: Mon, 25 Jul 2005 10:43:23 -0700
To: Cameron McCormack <cam-www-svg@aka.mcc.id.au>, www-svg@w3.org
Message-id: <>
Hi Cameron,
I looked at section 4.1 (http://www.w3.org/TR/sXBL/#rules1) and encountered 
the following:

If the binding has a shadow content template, then its 
<http://www.w3.org/TR/sXBL/#template0>template element is deeply cloned. 
Otherwise, no shadow content will be generated for the bound element, its 
<http://www.w3.org/TR/sXBL/#xblshadowtree>xblShadowTree attribute will be 
null, and its <http://www.w3.org/TR/sXBL/#xblchildnodes>xblChildNodes 
attribute will equal its childNodes attribute.

To me, the latest spec looks clear and straightforward. If a custom element 
matches a particular <xbl:definition>, and that <xbl:definition> has an 
<xbl:template>, then the custom element has a shadow tree because its 
xblShadowTree property points the deep clone of the <xbl:template>, 
followed by changing the <xbl:template> into an <xbl:shadowTree>. It is 
possible that the <xbl:shadowTree> has no child nodes as in your example 
below, but in this case technically there is still a shadow tree, just an 
empty one. An empty shadow tree would cause nothing to be rendered.

An empty shadow tree is very different from a non-existent shadow tree. If 
there is no <xbl:template>, then xblShadowTree is null, which causes 
xblChildNodes to equal childNodes, which means render the original content 
as if there were no binding.

Does that make sense? (I hope I am characterizing the sXBL spec correctly.)

If the spec is too obscure, then any suggestions about how to improve it 
will be appreciated.


At 12:20 AM 7/24/2005, Cameron McCormack wrote:

>With this document:
>   <svg ...>
>     <xbl:xbl>
>       <xbl:definition element="ex:test">
>         <xbl:template/>
>       </xbl:definition>
>       <xbl:definition element="ex:test2">
>         <xbl:template/>
>       </xbl:definition>
>       <xbl:definition element="ex:test3">
>         <xbl:template>
>           <ex:test2 id="A"/>
>         </xbl:template>
>       </xbl:definition>
>     </xbl:xbl>
>     <ex:test>
>       <ex:test2 id="B"/>
>     </ex:test>
>   </svg>
>would either of the ex:test2 elements have shadow trees?  I don't think
>the sXBL document is clear.
>   e-mail : cam (at) mcc.id.au           icq : 26955922
>      web : http://mcc.id.au/            msn : cam-msn (at) aka.mcc.id.au
>   office : +61399055779              jabber : heycam (at) jabber.org
Received on Monday, 25 July 2005 18:12:53 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:07 UTC