[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Writing stylesheets for Web and PDF output?

Subject: [xsl] Writing stylesheets for Web and PDF output?
From: Dan Vint <dvint@xxxxxxxxx>
Date: Sat, 26 May 2012 12:16:03 -0700

I have a situation where I need to write stylesheets that will be used to produce HTML output as well as generate FO to create PDF documents.

I'm wondering if anyone has come up with techniques that allow you to easily manage the commonality between these environments while allowing the generation of the unique requirements in formatting for each?

Things are pretty easy to deal with when one element in the source maps to an output structure in either FO or HTML. Where is gets difficult to manage is when you do some special processing to the content that is then wrapped with the output requirements. Now I want to share that processing and make sure it stays in synch between the two formats.

So beyond the following, is there anything else to help make this process manageable?

1) Create a stylesheet for HTML output.
2) Create a stylesheet for PDF/FO output.
3) Create the special content processing in a 3rd stylesheet in such a way that it can be included in the other two. Basically write these templates like they are functions that return a single value to be wrapped.

Danny Vint

Panoramic Photography

voice: 619-938-3610

Current Thread