You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by David Sacher <sa...@informatik.uni-muenchen.de> on 2000/03/15 13:45:43 UTC
problems with Writer in XSLTResultTarget?
Hi!
I'm using xalan (0.20.0) in a Java Server Page in order to transform
DB generated XML to HTML. The crucial part of code is as follows:
--------------------------------------------------------------
PrintWriter output = response.getWriter();
....
// create the XSLT processor
XSLTProcessor processor = XSLTProcessorFactory.getProcessor();
processor.setDiagnosticsOutput(output);
// create the XSLTInputSources
// for the xml code
// and for the xsl code
....
// now create the target
XSLTResultTarget htmlout = new XSLTResultTarget(output);
// and now process xml and xsl to html
processor.process(xmlin, xslin, htmlout);
------------------------------------------------------------
this prints out the diagnostics to output, but not the created html code.
Everything works fine if I initialize the XSLTResultTarget with
aFileOutputStream:
------------------------------------------------------------
XSLTResultTarget htmlout = new XSLTResultTarget(new
FileOutputStream("/home/public_website/test.out"));
------------------------------------------------------------
test.out contains the desired html code.
Am I making a major mistake or is this a bug? Are there ways around?
Cheers
David