The xslt is used to transform from your source format to the FO format used by FOP. If you already
have a formatting object file, you can pass it to fop immediately without transformation.
xsl can be a bit tricky to get started on, some like O'reilly's Java and XSLT book is probably a
good place to start.
FOP itself seems to produce reasonable messages.
--
John Burgess
Risk Decisions Limited
Whichford House
Parkway Court
Oxford Business Park South
OX4 2JY
T: 01865 718666
F: 01865 718600
M: 07984 863890
E: [email protected]
W: http://www.riskdecisions.com
On 03/06/2011 15:30, Theresa Jayne Forster wrote:
Ok I cannot see what is wrong here,
A test app does this
Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF,useragent,out);
TransformerFactory factory = TransformerFactory.newInstance();
Source xslt = new StreamSource(new File("C:/sample.xsl"));
Transformer transformer = factory.newTransformer(xslt);
And works fine,
The app I am working on does this
Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF,useragent,out);
TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer(new
StreamSource(inputFO));
And it immediately jumps out when it hits the newTransformer() line....
In the first it's an xslt, in the second it's a FO file, do I have to do
something different for that?
WTF aren't these the same, and why does so much of FOP jump out without even trying to give debug
output? Or is there a way of doing that?
Kindest regards
Theresa Forster
Senior Software Developer