Please use the JAXP standard instead of the XSLTInputHandler wrapper. Look at the ExampleXML2PDF.java in:
http://cvs.apache.org/viewcvs.cgi/xml-fop/examples/embedding/java/embedding/ Glen --- Philippe PITHON <[EMAIL PROTECTED]> wrote: > Hello ! > > > > I would like to improve the code below > > > > > > 2 questions : > > - java says to me that input.getParser() & > input.getInputSource() are > deprecated > > what is necessary to use in the place ? > > > > - to gain memory, are my files well closed? > > > > ------- > > > > XSLTInputHandler input = new XSLTInputHandler(new > File(xml),new > File(xsl)); > > ByteArrayOutputStream out = new > ByteArrayOutputStream(); > > Driver driver = new Driver(); > > driver.setLogger(loggerFop); > > driver.setRenderer(Driver.RENDER_PDF); > > driver.setOutputStream(out); > > driver.render(input.getParser(),input.getInputSource()); > > byte[] content = out.toByteArray(); > > FileOutputStream fos = new FileOutputStream(pdf); > > fos.write(content); > > __________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]