You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Andres Toussaint <an...@onemileup.com> on 2004/10/13 16:27:34 UTC

Merge two SVG documents

I want to merge a second SVG document into my first document, already 
displayed in a JSVGCanvas, but do not want to place it through a 
<image> element because i do want to have full access to the second SVG 
DOM.

WHAT IS THE PROPER WAY TO DO IT?

Thanks.



---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: Merge two SVG documents

Posted by Thomas DeWeese <Th...@Kodak.com>.
Andres Toussaint wrote:

> I want to merge a second SVG document into my first document, already 
> displayed in a JSVGCanvas, but do not want to place it through a <image> 
> element because i do want to have full access to the second SVG DOM.
> 
> WHAT IS THE PROPER WAY TO DO IT?

    Use Document.importNode(root2, true), to clone the first document
'under' the new document.  Then just append the result where you
want it in the parent document.  You may want to use the
x/y/width/height attrs on the SVG element to position/size it.

> 
> Thanks.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org