Hello, I struggling to create a webapps that creates pdf's for xml documents. The problem is: I can't pipe the output of my SAX transformation to the XSLTInputHandler.
My code uses a static xsl document and dynamic xml documents. For demonstration purposes I create the xml file on the local filesystem but that'S not very good for my webapplication :o/ Here the code: File xmlfile = new File(session.getServletContext().getRealPath("/xml/"), "nbw.xml"); OutputStream out = new java.io.FileOutputStream(xmlfile); StreamResult streamResult = new StreamResult(out); SAXTransformerFactory tf = (SAXTransformerFactory) SAXTransformerFactory.newInstance(); TransformerHandler hd = tf.newTransformerHandler(); Transformer serializer = hd.getTransformer(); serializer.setOutputProperty(OutputKeys.ENCODING, "ISO-8859-1"); serializer.setOutputProperty(OutputKeys.INDENT, "yes"); hd.setResult(streamResult); //Custom transformation with SAX XmlTransformer xmlt = new XmlTransformer(hd); String xslParam = session.getServletContext().getRealPath("/xml/nbw.xsl"); String xmlParam = session.getServletContext().getRealPath("/xml/nbw.xml"); File xmlFile = new File(xmlParam); //XSLT Transformation XSLTInputHandler input = new XSLTInputHandler(xmlFile, new File((xslParam))); renderXML(input, response); cheers, Pete -- Telefonieren Sie schon oder sparen Sie noch? NEU: GMX Phone_Flat http://www.gmx.net/de/go/telefonie --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]