I'm using Batik 1.6 and am running into issues when accessing a SVG file with internal references through an InputStream:

Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: org.apache.batik.transcoder.TranscoderException: null
Enclosed Exception:
null:-1
The URI "#aigrd1"
specified on the element <linearGradient> is invalid


If the SVG file is accessed directly though a URI there is no problem (aigrd1 is correctly defined). I found a mailing list item dating back to 2004 where someone has the same problem:

http://mail-archives.apache.org/mod_mbox/xmlgraphics-batik-users/200411.mbox/[EMAIL
 PROTECTED]

"
>> This is probably due to the use of streams. With a stream it
>>doesn't know the 'base URL' for the document. I had thought that
>>we had worked this out for internal references but it appears there
>>is at least a few cases we missed.
"

"Basically use the method above to provide what ever you are currently setting xml:base to the InputTranscoder. The URI isn't used to access data when you provide an input stream. "


When I try to use the workaround by inserting a dummy xml:base, I get this:

Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: org.apache.batik.transcoder.TranscoderException: null
Enclosed Exception:
null:-1
An I/O error occured while processing the URI:
"http://dummy#linearGradient334";
specified on the element <path>


Appearantly it does try to access the xml:base entry. So my questions:
1) has the InputStream / internal reference been solved now? If yes, why am I having this problem?
2) Putting in a dummy xml:base actually does not work. Why?

Tom

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

Reply via email to