You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Ulrich Mayring <ul...@denic.de> on 2001/11/14 18:34:23 UTC
XML_RENDER problem
Hello everyone,
when trying to render to XML I get this output:
[...]
Wed Nov 14 18:19:19 CET 2001 [INFO ] (xml): Parsing of document
complete, stopping renderer
Wed Nov 14 18:19:19 CET 2001 [DEBUG ] (xml): written out XML
Wed Nov 14 18:19:19 CET 2001 [DEBUG ] (xml): Initial heap size: 1958Kb
Wed Nov 14 18:19:19 CET 2001 [DEBUG ] (xml): Current heap size: 2804Kb
Wed Nov 14 18:19:19 CET 2001 [DEBUG ] (xml): Total memory used: 845Kb
Wed Nov 14 18:19:19 CET 2001 [DEBUG ] (xml): Memory use is
indicative; no GC was performed
Wed Nov 14 18:19:19 CET 2001 [DEBUG ] (xml): These figures should not
be used comparatively
Wed Nov 14 18:19:19 CET 2001 [DEBUG ] (xml): Total time used: 6807ms
Wed Nov 14 18:19:19 CET 2001 [DEBUG ] (xml): Pages rendererd: 1
Wed Nov 14 18:19:19 CET 2001 [DEBUG ] (xml): Avg render time:
6807ms/page
Wed Nov 14 18:19:19 CET 2001 [ERROR ] (xml): Oooops:
javax.xml.transform.TransformerException/null
The last line is from my program, it outputs (e.toString() + "/" +
e.getMessage()). It also prints a stack trace, but as you can see, there
is none. Here is my code:
private Driver xmlDriver;
private TransformerFactory transformerFactory;
xmlDriver = new Driver();
xmlDriver.setLogger(getLogger()); // getLogger() gets Avalon's logger
xmlDriver.setRenderer(Driver.RENDER_XML);
ByteArrayOutputStream out = new ByteArrayOutputStream();
Templates template = transformerFactory.newTemplates(xslSource);
Transformer transformer = template.newTransformer();
xmlDriver.setOutputStream(out);
Result saxResult = new SAXResult(xmlDriver.getContentHandler());
transformer.transform(xmlSource,saxResult);
out.flush();
out.close();
xmlDriver.reset();
The strange thing is that this code runs perfectly, when rendering to
PDF, i.e. setting the renderer to RENDER_PDF instead of RENDER_XML.
Thanks in advance for any pointers,
Ulrich
--
Ulrich Mayring
DENIC eG, Systementwicklung
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org