RE: Resolving URIs in shadow trees

At 10:25 AM 8/3/2005, Mark Birbeck wrote:

>Cameron,
>
> > I don't know if I would agree with that.  I'm sure there'd be
> > situations where you want a binding document to have some
> > gradients defined (for
> > example) that are used by all the shadow trees for a
> > particular binding, and you want to use a URI reference that
> > contains only a fragment identifier.  It would be a bit messy
> > to have to include the gradient element in each generated shadow tree.
>
>Definitely.
>
>Perhaps we need some sort of 'static' declaration, like in C++, where we can
>say that some content is available to all instances of a template, but it
>actually only need occur once. It retains encapsulation, which is one of the
>(many) benefits of XBL.

Mark,
The way to do a static declaration is to put the resource definition 
outside of the <xbl:template>. For example, here is an SVG file that could 
be imported (as in xbl:import) by another SVG file:

<svg...>
   <linearGradient id="foo"...>...</linearGradient>
   <xbl:xbl>
     <xbl:definition element="MyNS:MyElement">
       <xbl:template>
         <path fill="url(#foo)".../>
       </xbl:template>
     </xbl:definition>
   </xbl:xbl>
</svg>

Jon


>Regards,
>
>Mark
>
>
>Mark Birbeck
>CEO
>x-port.net Ltd.
>
>e: Mark.Birbeck@x-port.net
>t: +44 (0) 20 7689 9232
>w: http://www.formsPlayer.com/
>b: http://internet-apps.blogspot.com/
>
>Download our XForms processor from
>http://www.formsPlayer.com/

Received on Wednesday, 3 August 2005 17:53:34 UTC