Thanks Jake, that worked. @Chaals: The embed doesn't work in Adobe Illustrator CS2 / Inkscape 0.48 (including Jake's solution). My final use is converting SVGs into a PDFs / PNGs with rsvg-convert so the design can be printed on t-shirts and used for forum avatars (see www.vanvanvans.com/designer).
I've ended up not using the image element. I'm altering the SVG in PHP and I'm including the SVG files without <?xml and doctype headers into a <defs><g id='svgBack'><svg complete file></g></defs> element at the top. I include the images using <use overflow='visible' transform='matrix(0.555 0 0 0.555 0 0)' xlink:href='#svgBack' ></use> I've done it this way, as I'm manipulating the content of the SVG in PHP, this way I don't have the save the intermediate results on disc, speeding stuff up. Thank you for your help and suggestions. --- In svg-developers@yahoogroups.com, Jacob Beard <jbea...@...> wrote: > > Hi Marjn, > > So, this turned out to be less straightforward than I was expecting. > Basically, I know of two ways to embed external SVG content inside an SVG > document: using the "image" element, and using the "use" element. > Unfortunately, Gecko, including Firefox 3.6 and 4b6, seems to not support > using image with external SVG resources; however, it does work with the use > element. On the other hand, there has been a longstanding webkit bug[0] that > has prevented the use element from linking to external resources; but, > webkit does support using image with external resources. So, in order to > make this work across browsers, some work is required: > > http://live.echo-flow.com/stackoverflow/www.vanvanvans.com/test/embed.svg > > The shapes in the middle should now load everywhere. I added an extra column > of shapes on the far right: the star should load everywhere expect Webkit > browsers, and the circle should load everywhere but Firefox. I think the > markup I use to make this work is pretty evil, and it might just be better > to duplicate each image element. If anyone has any suggestions for > improvements, I'd like to hear it. > > Best, > > Jake > > [0] https://bugs.webkit.org/show_bug.cgi?id=12499 > > On Tue, Oct 19, 2010 at 8:58 AM, marijn.kampf <yahoo....@...> wrote: > > > > > > > Thanks for looking at this Jake, a live example can be found at: > > http://www.vanvanvans.com/test/embed.svg > > it should display two red circles and two red stars, however the svg files > > aren't shown, only the png files. All files are present in the same folder. > > > > Marijn > > > > > > --- In svg-developers@yahoogroups.com <svg-developers%40yahoogroups.com>, > > Jacob Beard <jbeard4@> wrote: > > > > > > Yes, this should be supported. It's hard to tell where this is failing > > just > > > by looking at the text. Can you post a live example? > > > > > > Jake > > > > > > > > > [Non-text portions of this message have been removed] > ------------------------------------ ----- To unsubscribe send a message to: svg-developers-unsubscr...@yahoogroups.com -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/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/svg-developers/join (Yahoo! ID required) <*> To change settings via email: svg-developers-dig...@yahoogroups.com svg-developers-fullfeatu...@yahoogroups.com <*> To unsubscribe from this group, send an email to: svg-developers-unsubscr...@yahoogroups.com <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/