How to feed the FO file?
Using the command line transform you just pass it to the -fo parameter.

Using embedded code I feed it as a SAXSource.
Reading in from file you have:
java.io.File
java.io.FileInputStream
org.xml.sax.InputSource
javax.xml.transform.sax.SAXSource

Creates the input.
Pass that in to:
javax.xml.transform.TransformerFactory
javax.xml.transform.Transformer
I'm not sure it's required but I copied this code from the FOP website:
Transformer.setParameter("versionParam", "2.0")

Then your transform, with the FOP output generated with these classes.
org.apache.fop.apps.FopFactory
org.apache.fop.apps.Fop
javax.xml.transform.sax.SAXResult

The SAXResult is created from the Fop.getDefaultHandler.
The Transformer can be created with an XSL file parameter to pass XML
into the transform, or with no XSL to pass the FO in.


-----Original Message-----
From: Dennis van Zoerlandt [mailto:[email protected]] 
Sent: Friday, March 25, 2011 10:30 AM
To: [email protected]
Subject: Re: AW: AW: AW: OutOfMemoryException while transforming large
XML to PDF


Hi Georg,

I'm currently running the XML and XSLT through XMLspy with FOP 0.95 (it
seems Altova doesn't support FOP 1.0).

I'm not really sure how to feed the FO file to FOP? Can I just put the
FO file as source file for the transformer.transform()?

I'll get back to you when I have a FO file. My pc's currently performing
very badly, so it seems it's a heavy job.

Best regards,
Dennis van Zoerlandt


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to