Adding FO to an existing XSL that was used to convert XML to HTML. I need to generate a PDF version of the output
Posted on 2014-07-30
I have a number of successful XML/XSL transformation that generate complex HTML pages. I need to make instead a PDF that can be embedded in an XML file instead of an HTML that is displayed in response. I have started with my simplest XML/XSL to figure out how to make this work.
I see in docs that this is a two step process but I am not sure how I need to accomplish this solution.
I find tutorials on XSL with fo, but do I use my current transformation and output XML, then run that through another XSL with the FO commands to apply formatting to tables and such. Or is this stuff I need to add to my current XSL sheet by inserting FO entries throughout my format?
The biggest part of the output is various tables, so it would be nice to be able to adjust the "class" attributes I use to format into ones that pick up formatting from the fo templates and attributes.
But I am not clear on the overall approach. Once I get that ahh-haa moment when I can see to full picture I can start hitting the detail of what is needed.
BTW - I use <oXygen/> XML Editor to test my setups before I deploy them to the Linux Web Server with Apache FOP. I did get a simple setup I found in Experts to work, but I can not seem to build that forward to function with my XSL.
I would be glad to provide samples if this is too vague.