Hi Tom,

Litton, Tom - CEPM wrote:
The problem is i don't know where the linked file will be at runtime (only that it will be in a jar on the classpath), so I'm not sure what to set the base URL to.

Ok, now the question makes a little more sense. From the Java code that building the image use ClassLoader.getResource to get URL that points to the image in question. The result will generally be a jar protocol URL but Batik can handle those so just set it as the xlink:href on the image element.

   If you don't have enough information to find the image
with the ClassLoader interfaces then there is no way Batik
can.


Thanks,

Tom

-----Original Message-----
From: Tonny Kohar [mailto:[EMAIL PROTECTED]
Sent: Monday, February 21, 2005 12:33 PM
To: Batik Users
Subject: Re: loading images from classpath


Hi,

On Tue, 2005-02-22 at 01:09, Litton, Tom - CEPM wrote:

Is there anyway of loading linked images from the classpath during the
transcoding process?  I'm trying to link a jpg image into an svg image
built during runtime, then transcode it.  I'm getting the error:


I am not sure if this is help you. If you build the dom on the runtime (eg: no svg xml file, but create
from on runtime), I think you may need to specify base URL so it could
resolve the relative path, unless you are referencing absolute path.




Regards
Tonny Kohar


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to