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

RE: Combining HTML/FO StyleSheets (Indirection/Abstrac

Subject: RE: Combining HTML/FO StyleSheets (Indirection/Abstraction Methods) - Non-Trivial
From: Joshua.Kuswadi@xxxxxxxxxxxxxxxxxxxx
Date: Mon, 4 Mar 2002 13:22:46 +1100
xsl fo combining pdf
Peter wrote:
> 	I have developing some XSLT files to translate an XML 
> document to HTML
> and then moved onto creating XSL:FO translation of the same 
> document. I
> noticed the bulk of the complex operations are the same or 
> very similar
> for both style sheets and in order to avoid inconsistances I like to
> merge the two sheets.
> 	Are there guidelines anywhere on developing such merged sheets?
> 	After slaving way at the problem I'll discuss below and 
> coming up with
> several non-working solutions, I was wondering "Do people create
> intermediate markup languages to ease the generation of both HTML and
> FO?" By this I mean do people generate and intermediate format (XML)
> which has all of the complex processing completed, and then have
> trivial conversion style sheets from that format to HTML or XSL:FO as
> appropriate? ((Example: intermediate tag like <paragraph> -> <p> or
> <fo:block> depending on the desired output format))

Hi Peter,

We've built a web site that will generate the data in XML and then present financial reports to the web client as either HTML, CSV(text) or PDF (converted from XSL-FO). In addressing the same issue, we have three different stylesheets, one for each desired output. As you can appreciate, some display logic is common, particularly between the HTML and XSL-FO version. 

Let's say I have report_html.xsl, report_fo.xsl and report_csv.xsl. One partial solution I developed was to write a stylesheet that transformed the report_html.xsl into report_fo.xsl. However, this was only a partial solution because I still needed to tweak the individual files as HTML doesn't require <fo:table-column> elements.

With hindsight, one thing I would have changed is writing the report_fo.xsl first as this is more detailed, and then writing the stylesheet to transform it to report_html.xsl. In one sense, this is using XSL-FO as the intermediary format you mentioned. With the XSL-FO you can either generate the PDF, or generate the HTML.

I'm sure other people will know of stylesheets that are already written to transform XSL-FO to HTML.

Hope that helps and good luck,

This message and any attachment is confidential and may be privileged or otherwise protected from disclosure.  If you have received it by mistake please let us know by reply and then delete it from your system; you should not copy the message or disclose its contents to anyone.

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

Current Thread


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.
First Name
Last Name
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.