« UPS Tracking via RSS, Take Two Inline Trackbacks »
XSL-FO vs. CSS
Posted January 20, 2005 – 11:44 am by Yakov Shafranovich in ProgrammingI just saw An article on XML.com (via SlashDot) discussing how CSS stylesheets can work better for printing than XSL-FO (as a rebuttal to a post by Norman Walsh). As a proof, the authors show a 100 line CSS stylesheet that accomplishes the same thing as a 1,000 XSL-FO stylesheet written by Norman Walsh.
While I see no problem with their approach, I do wonder whether it will still work with more complex documents. Given that XSL-FO is partly based on the CSS standard, it is logical that the two can accomplish the same thing, but I am not sure if they can.
Additionally, another thing that bothered me about the article is the lack of tools for CSS + XML printing. I tried using the stylesheet provided in the latest versions of Opera and Firefox with no luck. The only tool mentioned by the authors is a commercial one called Prince (which they themselves write and sell). Unlike XSL-FO where multiple processors are available to choose from, at least one of which is open source is free, for CSS + XML there isn’t much out there.
Some may argue that browsers will be able to process CSS + XML without a need for a separate tool. This however is not good enough for the a business. For example, my company uses XSL-FO for producing PDF files for printing. Why didn’t we go with CSS and “media=print” tag? Because 90% of the world runs IE which is yet to support HTML 4 in some cases! My company cannot rely on a possibility that the browser will not print, which is why we are forced to use PDF. Given a choice of a wide variety of tools for XSL-FO some of which are free, and one or two tools for CSS + XML, we rather go with XSL-FO.
P.S. While looking at Normal Walsh’s site, I came across a lint tool for XSLT. Looks pretty nice.
UPDATE: While looking at the W3C XSL page I came across a a utility for converting XSL+CSS to XSL-FO.
Permalink | Trackback URL | This post has















Sorry, comments for this entry are closed at this time.