- From: Cameron McCormack <cam-www-svg@aka.mcc.id.au>
- Date: Wed, 3 Aug 2005 08:45:23 +1000
- To: www-svg@w3.org
Jon Ferraiolo:
> Maybe the rules is that first you call getElementById() on the <shadowTree>
> and then if no match is found then call it on ownerDocument. What do you
> think?
Here's another use case I thought of while lying in bed last night:
--- bindings.svg ---
<svg ...>
<xbl:xbl id="myUse">
<xbl:definition element="ex:myUse">
<xbl:template/>
<xbl:handlerGroup>
<handler ev:event="xbl:bound">
var use = evt.target.ownerDocument.createElementNS(SVGNS, "use");
use.href = evt.target.getAttributeNS(XLINKNS, "href");
evt.xblShadowTree.appendChild(use);
</handler>
</xbl:handlerGroup>
</xbl:definition>
</xbl:xbl>
</svg>
--- test.svg ---
<svg ...>
<xbl:xbl>
<xbl:import xlink:href="bindings.svg#myUse"/>
</xbl:xbl>
<g id="a"/>
<ex:myUse xlink:href="#a"/>
</svg>
This won't work under the proposed rule for resolving URIs, since the
element with ID "a" is in the bound element's document rather than the
binding document.
--
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 Tuesday, 2 August 2005 22:45:31 UTC