xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathan wood <jonathanshaww...@gmail.com>
Subject Re: Combine SVG out of single SVG files
Date Thu, 23 Jun 2011 12:17:42 GMT
For completeness (and to cover the simplest solution that I didn't present
earlier)....

adding svg:image elements with the xlink:hrefs pointing to the external
files would also work.

On Wed, Jun 22, 2011 at 9:45 PM, jonathan wood
<jonathanshawwood@gmail.com>wrote:

> Thanks for the additional info Helder.
>
> Note that even with a use tag, if you want to add the existing svg to a top
> level template programatically, you'd still need to follow the prior
> instructions with the following modification.  Note that this is not the use
> case specified by the requester as there is no element reuse in the
> originally described scenario.
>
> - uniquely id the new element
> - create a defs element and append the imported node to the defs element.
> - create and add a use element with the xlink:href attribute set to
> "url(#newnodeid)"
>
>
> 2011/6/22 Helder Magalhães <helder.magalhaes@gmail.com>
>
>> Hi everyone,
>>
>> > One way to do it...assumes the file was read and placed into a byte
>> array by
>> > loadMyFile() (your implementation).
>> > All fluff and exception handling removed, but the basic sequence is:
>> [...]
>>
>> Apart from this (good) suggestion, note that SVG also has an "import"
>> mechanism, namely the 'use' element [1]. Just in case someone missed
>> it! ;-)
>>
>> Cheers,
>>  Helder
>>
>>
>> [1] http://www.w3.org/TR/SVG11/struct.html#UseElement
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>>
>>
>

Mime
View raw message