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 Stephan Müller <sm...@mail.inf.tu-dresden.de> on 2004/09/01 12:23:17 UTC
SVG and xlink:href
Hello,
I want to copy a SVG into a repository. After that, other images and SVG being used by my SVG (with
<image xlink:href=...> or <use xlink:href...>) cannot be found. Is there a possibility to transform
a SVG, so that it no longer contains references to other files? At least I have to replace the
relative links...
Thanks for any suggestions
Stephan Müller
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org
Re: SVG and xlink:href
Posted by Thomas DeWeese <Th...@Kodak.com>.
Hi Stephan,
This is doable, other options you might consider, use the
xml:base attribute to point to the original source location.
The real problem with replacing the links is the need to
base64 encode the referenced content for JPG/PNG. Also you
would need to 'import' content referenced by use to the local
document. For the 'image' element referencing SVG you are
actually in a bit of trouble since I don't think we currently
support base64 encoded SVG data in image tags. So you would
have to fake the image element with an SVG and copy the SVG file in
(which is probably the 'right' thing to do anyway).
Jorg Heymans wrote:
> xslt seems like a good choice here. Alternatively, you could define an
> entity in your document that contains the path, and reference this
> entity in you <image> and <xlink> tags. Then when you transfer it into
> the repository just replace the entity with the correct path.
>
> hth
> Jorg Heymans
>
> Stephan Müller wrote:
>
>> Hello,
>>
>> I want to copy a SVG into a repository. After that, other images and
>> SVG being used by my SVG (with <image xlink:href=...> or <use
>> xlink:href...>) cannot be found. Is there a possibility to transform a
>> SVG, so that it no longer contains references to other files? At least
>> I have to replace the relative links...
>>
>> Thanks for any suggestions
>>
>> Stephan Müller
>
>
>
> ---------------------------------------------------------------------
> 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
Re: SVG and xlink:href
Posted by Jorg Heymans <jh...@domek.be>.
xslt seems like a good choice here. Alternatively, you could define an
entity in your document that contains the path, and reference this
entity in you <image> and <xlink> tags. Then when you transfer it into
the repository just replace the entity with the correct path.
hth
Jorg Heymans
Stephan Müller wrote:
> Hello,
>
> I want to copy a SVG into a repository. After that, other images and SVG
> being used by my SVG (with <image xlink:href=...> or <use
> xlink:href...>) cannot be found. Is there a possibility to transform a
> SVG, so that it no longer contains references to other files? At least I
> have to replace the relative links...
>
> Thanks for any suggestions
>
> Stephan Müller
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org