Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Produce XSL-FO and HTML from "one XSLT"

From: "Oleg Tkachenko [MVP]" <oleg@--_!----!_------!---------.--->
To: NULL
Date: 8/6/2004 11:32:00 PM
Lars Moastuen wrote:

> We are currently working on a module that uses XLST to transform XML to  
> HTML and PDF. Since we want to minimize the time used to maintain the  
> XSLTs, we are hoping there is a way of just using one XSLT for the 
> actual  output, and maybe some routine to create PDF from the output 
> created by  the XLST, for example one XSLT that creates HTML from the 
> XML, and another  XLST that creates XSL-FO from that HTML. I know this 
> is possible, but is  this considered a good solution?

Making XSL-FO from HTML you can get really poor XSL-FO. XSL-FO is quite 
different language, not to mention it's much richer than HTML. I'd have 
different stylesheets, that's traditional way and it's proved to work 
fine. But if you don't need all power of XSL-FO, but only 
HTML-compatible subset - why not?

> Another issue we are dealing with are CSS. In the HTML output we use 
> CSS,  is there a way of using the CSS information when creating XSL-FO 
> output?  Or must the formatting be hardcoded in the XSLT creating the 
> XSL-FO?

You can have external XSLT stylesheet or just plain XML to define 
styles, just as in CSS and then apply it when producing XSL-FO. XSLT has 
xsl:attribute-set instruction to facilitate that.

> Is there anything else we should take a look at?

It's feasible also to parse CSS and convert it to XML.

-- 
Oleg Tkachenko [XML MVP]
http://blog.tkachenko.com


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent