[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: how to convert HTML to FO

Subject: RE: how to convert HTML to FO
From: "Andreas L. Delmelle" <a_l.delmelle@xxxxxxxxxx>
Date: Fri, 19 Sep 2003 23:01:11 +0200
html to fo
> -----Original Message-----
> From: Biying Huang
>
> I need to format a java object MyObject to PDF. So I convert MyObject to
> a XML file and write a XSL file to transform the XML data into PDF by
> using FOP.
>
> One attribute of MyObject is a String representing html source code. In
> my XSL file, how do I convert this html portion to FO so that FOP can
> process it?
>

Rather depends on the level of complexity of the HTML portion, but...

Looks like this could be solved by:

a. setting up an extra XSLT for the transformation HTML->FO & make sure the
template you are going to use is defined with an <xsl:param ...>
(I'm not sure but I seem to recall running into generic HTML->FO stylesheets
somewhere...)

b. referencing this extra XSLT in your original XSL ( via <xsl:include ...
> )

c. perform an <xsl:call-template ...> <xsl:with-param ...> in your original
XSLT and feed it the value of your object's html attribute (or, better even,
the node that contains the HTML portion ... if the HTML is well-formed, it
should be possible to store this as a node in your XML, rather than as an
attribute - pass the node to the HTML2FO-template and make the template
return a FO-node to enter in your resulting document.)

Vaguely sketched, so this method would definitely need a bit of fine-tuning.

Hope this helps.


Greetz,

Andreas Delmelle


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.