Robert, did you mean something like:
<svg><foreignObject><iframe src="some.svg"/></foreignObject></svg>? That might work (well, if some xhtml namespace magic is added), but it's likely to be inconsistently implemented (at least that's my experience, but if you stay away from transforms, filters, clipping etc then it might work well enough in a couple of the browsers). In any case you don't need a foreignObject to be able to nest <svg> tags, that works just fine without <foreignObject>. But that's not really embedding, that's inlining. If on the other hand the main document was an html document, which had one inline svg defined in it, it could easily add an <iframe> on top of the svg that referenced another svg. That should work fine in all the browsers, including IE. If you really need to keep the svgs separate and let script both these documents then this is what I'd recommend. Cheers /ed On Mon, 27 Aug 2012 20:39:32 +0200, Robert Longson <[email protected]> wrote: > You could use a <foreignObject> and put the content <svg> in as a child > of that. It won't work in IE9 or IE10 though as that doesn't support > <foreignObject> but it will on other browsers. > > Robert. > > --- In [email protected], "akcindalch" <m.iskerkova@...> > wrote: >> >> I wanted to avoid using HTML.. I wanted just "include/embed" one SVG >> into another and comunicate between them. For example: I have main SVG >> with some graphics. When I right-click on something, second SVG >> 'colorPicker' should appear - as context menu. Then when I click on >> some color in context menu, color of object in main SVG is changed and >> contect menu is closed. I know that I can have 'colorpicker' in main >> SVG by "writing it in", but I wanted to do it more modular, so I can >> change/extend it easilly, without need of changing main SVG. But as it >> seems it's not possible. (At least not with client-side only, even if >> both files are local/from same domain.) >> >> --- In [email protected], Marty Sullivan <dark3251@> wrote: >> > >> > Well I'm not sure what you're trying to do in your SVG, but you could >> load >> > all of the SVG docs into the background of one HTML page and then >> have one >> > blank SVG doc to place the elements you're trying to use with a >> script in >> > the HTML. I've never tried that but it's easy enough to get one SVG >> and >> > HTML page to interact so I don't see why it couldn't be done with >> multiple >> > SVG's. >> > >> > On Thu, Aug 23, 2012 at 12:18 PM, akcindalch <m.iskerkova@> wrote: >> > >> > > ** >> > > >> > > >> > > I can have html in html (iframes) and even modify outer or inner >> html with >> > > javascript included/loaded by these pages.. I know that iframes >> aren't >> > > recomended, but they're still enabled.. >> > > I just don't understand , why I can't have simillar feature in svg, >> OR CAN >> > > I?? (It haven't to be <image> tag, I just want to know, if there os >> a way >> > > to build modular SVG containing other SVG and comunicate between >> them.) >> > > >> > > >> > > > It's all there in the link. No local access becasue of >> > > https://bugzilla.mozilla.org/show_bug.cgi?id=628747#c3 >> > > ... >> > > >> > > >> > > >> > >> > >> > [Non-text portions of this message have been removed] >> > >> > > -- Erik Dahlstrom, Core Technology Developer, Opera Software Co-Chair, W3C SVG Working Group Personal blog: http://my.opera.com/macdev_ed ------------------------------------ ----- 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/ <*> 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: [email protected] [email protected] <*> 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/

