You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by Daniel López <D....@uib.es> on 2001/08/17 10:38:20 UTC

[Fwd: svg-20001102.dtd not found.]

Hi,
Nobody in the users list could help me, as it might require an inside
knowledge of batik, so here I go:
I'm trying to process an SVG file inside a servlet to show a JPEG image
and after dealing with a couple of XML parser incompatibility issues,
I've stumbled into this error. When I process the SVG file, a sample
file provided with the batik-1.1rc, I get the error:
java.io.IOException: File
"jndi://D_/Apps/Test/Test/Test/WEB-INF/lib/batik-svg-dom.jar/org/apache/batik/dom/svg/resources/svg-20001102.dtd"
not found.
The file batik-svg-dom.jar is in the classpath and it is exactly in
D:/Apps/Test/Test/Test/WEB-INF/lib/, I also checked to see that the dtd
file is in there and indeed, it is. Any clues?
This is how I'm processing the file, extracted from the sample files and
some messages from this list archive:
//****
   // create a JPEG transcoder
   JPEGTranscoder t = new JPEGTranscoder();
   // set the transcoding hints
   t.addTranscodingHint(JPEGTranscoder.KEY_XML_PARSER_CLASSNAME,
                        "org.apache.crimson.parser.XMLReaderImpl");
   t.addTranscodingHint(JPEGTranscoder.KEY_QUALITY,
                        new Float(.8));
   // create the transcoder input
   SAXSVGDocumentFactory svgFactory = new
SAXSVGDocumentFactory("org.apache.xerces.parsers.SAXParser");
   String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI;
   // Input is the sample file batik3D.svg, read as an InputStream
   Document document =
svgFactory.createDocument(svgNS,xmlSource.getInputStream());
   TranscoderInput input = new TranscoderInput(document);
   // create the transcoder output
   response.setContentType("image/jpeg");
   TranscoderOutput output = new
TranscoderOutput(response.getOutputStream());
   // generate/show the image
   t.transcode(input, output);
//****
Any clues what might be going wrong?

Thanks in advance,
D.
PD: I also tried with batik1.0 with no luck. Platform is WinNT,
Orion1.4.5, JDK1.3

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