Hi Holger, That was a really good tip. I think this should work for me. I tried it out and it so far appears to have the potential. The use element along with correspondingElement is what I'm planning to use.
I had tried the second approach you mentioned of loading the SVG using getURL(). The problem with that approach for me was the CSS properties are shared by the main document. So, if I have style with the same name such as .st3 - that goes global i.e. if the included SVG has a style called .st3 and the parent SVG also has a .st3 style then the new style for st3 appears across the composite document even if the included SVG is within an SVG block - it looks like style information is global and not scoped to the enclosing SVG. The use element retains this scoping and hence works well. Thanks, Shreesh Holger Will <[EMAIL PROTECTED] To: svg-developers@yahoogroups.com .de> cc: Sent by: Subject: Re: [svg-developers] Embedding SVG Image and its shadow tree [EMAIL PROTECTED] ogroups.com 06/28/2005 11:45 PM Please respond to svg-developers [EMAIL PROTECTED] schrieb: > Hi, > > I have a question on image embedding: > > I wish to embed my SVG pieces as an image element. But, I also need it to > be "alive". Currently, the image element is opaque i.e. the internal > shadow > tree is hidden and I cannot access it. Any idea of how to access the > shadow > tree of the embedded image then? Essentially, I need to change the > embedded > SVG image based on events. > > One possibility I thought was of sending the event to the image where the > image can then process the event. Well - since I cannot access the SVG > document I cannot send it still i.e. cannot send the event to the embedded > SVG DOM. > > One other possibility was for this embedded SVG to allow data to be > injected to it. This implies a callback mechanism which the script can > handle. Any way this can be achieved too? > > Thanks, > > Shreesh Hi Shreesh are you embeding your SVG inside another SVG ? if yes, you are probably looking for <use xlink:href="another.svg#someshape"/> which will give you access to the "shadow" DOM. sadly this is only implemented in ASV6 and Batik. a workaround im using is to use getURL() to load the image, and then append it to the current document, in this way the images DOM will get part of the documents DOM. hth Holger ----- To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" ---- <?---- LSpots keywords ?> <?---- HM ADS ?> YAHOO! GROUPS LINKS Visit your group "svg-developers" on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. ----- To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" ---- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/