I´ve been trying to do some xml --> pdf transformation using FOP.
When I run FOP manually everything is wonderful,  but i don´t seem to really
understand how to embeed it in a running app.
The problem is with the input Source ..
I have both the xml file and the xsl file as org.w3c.dom.Document and I
don´t seem to be able to use them as input for the transformation.
I´ll post a code snippet to make myself clear
                Document voucher = ...
                Document xsl = ....

                //XSL Formatting.
                Driver driver = new Driver();
                driver.setRenderer( Driver.RENDER_PDF );
                driver.setInputSource( new DocumentInputSource( xsl ) );
                driver.setOutputStream( outStream );
                driver.render( voucher );

that is almost a copy from the fop documentation
(http://xml.apache.org/fop/embedding.html), the problem is.. I seem to be
setting an XSL file as an input... so where do I set the XML Document as an

I´ve been digging thru the fop api and found out this class XSLTransform
wich seems to take an XLM doc, and a XSL file as inputs and outputs a
org.w3c.dom.Document, but again.. I can´t input the XSL as a document...

there are any workarounds to this problems?...
or maybe some ideas?

Thanks for all your help!

Best Regards,
Esteban González

Esteban González

Departamento de Sistemas
ASSIST-CARD International

Reply via email to