Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Produce XSL-FO and HTML from "one XSLT" [Thread Next] Re: Produce XSL-FO and HTML from "one XSLT"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 | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
