generating HTML from XSL-FO using Java
I have so开发者_开发技巧me PDF files generated based on some XSL-FO documents and I now need this content in HTML too. I am using FOP for creating the PDF files but this does not support HTML as an output format.
My question is this: Is there a Java library of some sort that can create HTML files based on XSL-FO documents, or can I do this with throwing XSLT at it. Can I somehow extend FOP to create me this type of output?
If XSLT is the only way to go, is there one already created? (I imagine I am not the first dude wanting this)
Thank you all!
You could use the Render-X provided FO2HTML stylesheet to convert the XSL-FO into XHTML output. It converts <block>
elements into <div>
, <inline>
into <span>
, etc.
I have used it, and it works great.
精彩评论