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 "Bishop, Michael W. CONTR J9C880" <Mi...@je.jfcom.mil> on 2006/04/21 15:25:19 UTC
Storing relative URLs?
I embed images in my SVG document and until now I've just been putting
the filename as the URL:
xlink:href="somePic.jpg"
Batik complains when I try to export the document to a JPG or a PNG
because it can't determine the URL protocol to use. The only URL I've
gotten to work is an absolute URL (File.toURL()), but I don't want to do
that. I store things in a temp directory that shouldn't be referenced
when a user saves a document. Is there a way to get a relative path
(relative to the SVG document)? file://./somePic.jpg
<file:///\\.\somePic.jpg> didn't work and neither did
file://somePic.jpg <file:///\\somePic.jpg> .
Michael Bishop
Re: Storing relative URLs?
Posted by th...@kodak.com.
Hi Michael,
See my response to Dylan on setting the base url of a Document in
memory.
"Bishop, Michael W. CONTR J9C880" <Mi...@je.jfcom.mil> wrote on
04/21/2006 09:25:19 AM:
> I embed images in my SVG document and until now I?ve just been putting
the
> filename as the URL:
>
> xlink:href=?somePic.jpg?
>
> Batik complains when I try to export the document to a JPG or a PNG
because it
> can?t determine the URL protocol to use. The only URL I?ve gotten to
work is
> an absolute URL (File.toURL()), but I don?t want to do that. I store
things
> in a temp directory that shouldn?t be referenced when a user saves a
document.
> Is there a way to get a relative path (relative to the SVG document)?
file:
> //./somePic.jpg didn?t work and neither did file://somePic.jpg.
>
> Michael Bishop
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org