xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Milan Trninic" <mtrni...@galdosinc.com>
Subject 'use' element and DOM structure
Date Thu, 11 Apr 2002 20:08:41 GMT
Hi,

does someone know how to figure out what School has user clicked on. In the following snippet:

<g id="School" transform="scale(0.25)">          
    <path style="..."d="..."/>           
    <path style="..." d="..."/>       
</g>       
<use transform="translate(0.0,400.0) scale(1)" xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:href="#School" id="School.1"/>    
<use transform="translate(0.0,400.0) scale(1)" xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:href="#School" id="School.2"/>    

There are two schools with IDs Schools.1 and School.2. When user clicks on one of them, the
event contains the g element, not the 'use' element. Now I couldn't figure out how to follow
the link backwards to the 'use' element.
The problem is that the SVG document contains 'use' elements without children ("non-exposed
DOM tree" as the spec state), and g element which I can get from the event is the one under
svg, not the cloned (non-exposed) one under 'use'.

Thanks

Milan


Mime
View raw message