xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brent L Johnson" <br...@bjohnson.net>
Subject not an SVG document
Date Mon, 30 Jul 2001 07:32:20 GMT
Well - I've managed to work through most of the previous problems I was
having.  I dropped the idea of doing the SVG transcoding output in JSP in
favor of a graphing servlet.

Here is my current problem:
org.apache.batik.transcoder.TranscoderException: The specified XML document
fragment is not an SVG document

I've managed to search through the mailing list archives and I did catch a
thread with someone having a similar problem.  But, they weren't running a
document through a parser first though.

I've found that I can open an SVG file and transcode it sending it the
InputStream of the file.  It reads it and works great!  (found a great SVG
program from www.jasc.com called WebDraw that outputs SVG)  I can take my
file straight out of WebDraw and transcode it to a jpeg.

The problem comes in when I parse the document with Xerces first, then send
the document to transcode instead of the file stream.  It keeps telling me
it's not an SVG document.  So, I had Xerces parse the document, then output
the XML file after the parse - and I saved this out to a test.svg file.  I
then passed the stream of that file into transcode and it worked fine!

Why can I output the parsed XML data from Xerces into a text file and
transcode that, but I can't transcode by sending the document directly?
Without being able to parse the file on the fly, I can't modify the
rectangle attributes to dynamically change my bar charts (unless I do
something crazy like parse the file, make the changes, save it out to a text
file, then open and transcode that).

Thanks,

- Brent


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Mime
View raw message