Re: different input type to org.apache.fop.apps.XSLTInputHandler;
Andrew S Moy wrote: The constructor of org.apache.fop.apps.XSLTInputHandler takes the XML file and XSL file. I was wondering if anyone knows other XSLTInputHandler which takes some source of input stream objects. This way we don't have to write the data to a physical file and knowing that it will be read again from the InputHandler. Reading/writing from/to a physically media is always slower that from/to the system memory. In FOP 0.20.5 XSLInputHandler has three public constructors: public XSLTInputHandler(File xmlfile, File xsltfile) public XSLTInputHandler(String xmlURL, String xsltURL) public XSLTInputHandler(InputSource xmlSource, InputSource xsltSource) either of the the later two can be used to process data that is already in memory, without the need to write to disk. Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: different input type to org.apache.fop.apps.XSLTInputHandler;
Chris Bowditch wrote: In FOP 0.20.5 XSLInputHandler has three public constructors: public XSLTInputHandler(File xmlfile, File xsltfile) public XSLTInputHandler(String xmlURL, String xsltURL) public XSLTInputHandler(InputSource xmlSource, InputSource xsltSource) either of the the later two can be used to process data that is already in memory, without the need to write to disk. Oops, didnt look closely enough. Its only the last one that can be used for reading in memory data. e.g. ByteArrayInputStream xmlin = new ByteArrayInputStream(xml.getBytes()); ByteArrayInputStream xslin = new ByteArrayInputStream(xsl.getBytes()); XSLTInputHandler transform = new XSLTInputHandler(xmlin, xslin); Hope this makes sense, Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: different input type to org.apache.fop.apps.XSLTInputHandler;
Chris Bowditch wrote: Sorry about all the noise, but I got it wrong again. ByteArrayInputStream xmlin = new ByteArrayInputStream(xml.getBytes()); ByteArrayInputStream xslin = new ByteArrayInputStream(xsl.getBytes()); XSLTInputHandler transform = new XSLTInputHandler(xmlin, xslin); Correct version is: ByteArrayInputStream xmlin = new ByteArrayInputStream(xml.getBytes()); ByteArrayInputStream xslin = new ByteArrayInputStream(xsl.getBytes()); XSLTInputHandler transform = new XSLTInputHandler(new InputSource(xmlin), new InputSource(xslin)); Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: different input type to org.apache.fop.apps.XSLTInputHandler;
Besides Chris' answer, I would also recommend switching to JAXP. Look at our examples on this page: http://xml.apache.org/fop/embedding.html Also, please remember to unsubscribe from the FOP user lists (as well as any other) when you go on vacation, so we don't receive your out of the office messages. Thanks, Glen --- Andrew S Moy [EMAIL PROTECTED] wrote: Hi, The constructor of org.apache.fop.apps.XSLTInputHandler takes the XML file and XSL file. I was wondering if anyone knows other XSLTInputHandler which takes some source of input stream objects. This way we don't have to write the data to a physical file and knowing that it will be read again from the InputHandler. Reading/writing from/to a physically media is always slower that from/to the system memory. Thanks, Andy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
different input type to org.apache.fop.apps.XSLTInputHandler;
Hi, The constructor of org.apache.fop.apps.XSLTInputHandler takes the XML file and XSL file. I was wondering if anyone knows other XSLTInputHandler which takes some source of input stream objects. This way we don't have to write the data to a physical file and knowing that it will be read again from the InputHandler. Reading/writing from/to a physically media is always slower that from/to the system memory. Thanks, Andy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]