- From: Peter Sorotokin <psorotok@adobe.com>
- Date: Thu, 04 Nov 2004 10:30:19 -0800
- To: ralf@audiofarm.de, www-svg@w3.org
At 05:00 PM 11/4/2004 +0100, ralf@audiofarm.de wrote:
> >From the specification it's not clear to me (i.e. I can't find it), how
>one would elegantly access an element by its id within a sXBL template
>instance.
>
>Example:
>-----------------------------------------------
>
><xbl:xbl>
> <xbl:definition element="audiofarm:knob">
> <circle id="innerRing" />
> <circle id="outerRing" />
> <text id="channelLabel" />
> </xbl:definition>
></xbl:xbl>
>
><audiofarm:knob id="knob1" />
><audiofarm:knob id="knob2" />
><audiofarm:knob id="knob3" />
>
>-----------------------------------------------
>
>How would one access the "innerRing" element of "knob2"?
>
>I think of something like getElementById("knob2.innerRing") - is there
>such a mechanism in SVG 1.2?
document.getElementById("knob2").xblShadowTree.getElementById("innerRing")
Note that accessing xblShadowTree more or less should be left to component
code only so that you can change implementation later on.
Peter
>ralf ...
Received on Thursday, 4 November 2004 18:31:02 UTC