Amine AMAR wrote:
Hi All,

I need to use XSLTInputHandler with an runtime generated xml document. I would like to just stream-line it to XSLTInputHandler and not use the file system.
is there a way to do so? or a workarround?

This has just been answered yesterday.

   Driver driver =new Driver();
   driver.setOutputStream(response.getOutputStream());
   driver.setRenderer(Driver.RENDER_PDF);
   Transformer transformer=TransformerFactory.newInstance()
     .newTransformer(new StreamSource("foo.xsl"));
   transformer.transform(xmlsource,
     new SAXResult(driver.getContentHandler()));

xmlsource can be a DOMSource or a SAXSource as well as an
arbitrary StreamSource.
You don't have to call run() or render() on the driver object.

J.Pietschmann



Reply via email to