It turns out the essence of the problem can be stated "can batik be used programmatically from within an application which makes use of xerces2"? More details below:
> Would you have a more complete stack trace. By adding the following patch Index: dom/util/SAXDocumentFactory.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/dom/util/SAXDocumentFacto ry.java,v retrieving revision 1.9 diff -u -r1.9 SAXDocumentFactory.java --- dom/util/SAXDocumentFactory.java 20 Mar 2002 11:54:04 -0000 1.9 +++ dom/util/SAXDocumentFactory.java 3 Apr 2002 12:49:45 -0000 @@ -210,6 +210,7 @@ this); parser.parse(is); } catch (SAXException e) { +e.printStackTrace(); Exception ex = e.getException(); if (ex != null && ex instanceof InterruptedIOException) { throw (InterruptedIOException)ex; I was able to produce the following stack trace: [java] About to transcode 1 SVG file(s) [java] [java] java.lang.IllegalStateException: can't declare any more prefixes inthis context [java] at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:524) [java] at org.apache.crimson.parser.Parser2.parse(Parser2.java:305) [java] at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433) [java] at org.apache.batik.dom.util.SAXDocumentFactory.createDocument(Unknown Source) [java] at org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(Unknown Source) [java] at org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(Unknown Source) [java] at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown Source) [java] at org.apache.batik.apps.rasterizer.SVGConverter.transcode(Unknown Source) [java] at org.apache.batik.apps.rasterizer.SVGConverter.execute(Unknown Source) [java] at org.apache.batik.apps.rasterizer.Main.execute(Unknown Source) [java] at org.apache.batik.apps.rasterizer.Main.main(Unknown Source) [java] java.io.IOException: can't declare any more prefixes in this context [java] at org.apache.batik.dom.util.SAXDocumentFactory.createDocument(Unknown Source) [java] at org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(Unknown Source) [java] at org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(Unknown Source) [java] at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown Source) [java] at org.apache.batik.apps.rasterizer.SVGConverter.transcode(Unknown Source) [java] at org.apache.batik.apps.rasterizer.SVGConverter.execute(Unknown Source) [java] Converting bench.svg to C:\gump\site\docs\images\bench.png ... ... error (SVGConverter.error.while.rasterizing.file) [java] at org.apache.batik.apps.rasterizer.Main.execute(Unknown Source) [java] at org.apache.batik.apps.rasterizer.Main.main(Unknown Source) > Also, do you know which > version of Batik you are using? the latest from cvs > I am able to see the file ok with the current Batik CVS base, assuming > the asf-logo.svg file you are referencing is the same as the one in > xml-batik/samples. Apparently if I run using the -jar option it works. But when I construct my classpath and happen to have xml-api.jar from xml-commons and xml-xerces2 xercesImpl.jar and xmlParserAPIs.jar from xerces2 earlier in the classpath, I get the error above. - Sam Ruby --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]