View Full Version : CSS vs XSL-FO
Erich
12-26-2003, 04:02 AM
Whats best to use for regular xhtml pages? Whats the biggest difference?
Just curious, since im already very familiar with CSS.
Well, support for XSL-FO is currently about zero.
The main difference is that XSL-FO is written in XML. I don't have much experience with it myself, so I can't tell you much about it.
Alex Vincent
12-26-2003, 08:16 PM
It's really determined by how you want the end document to appear. If it's as XHTML or HTML, CSS is all you need.
XSL-FO is, I believe, a language for transforming XML documents to non-XML formats.
Originally posted by Alex Vincent
XSL-FO is, I believe, a language for transforming XML documents to non-XML formats. That's XSLT. XSL-FO is the XML equivalent of CSS, a formatting language.
Alex Vincent
12-28-2003, 07:33 AM
I think you're wrong about that; XSLT is for transforming one XML document into another.
liorean
12-28-2003, 11:40 AM
Time for me to walk in and correct everyone!
XSLT is for transformation, to any format. You could as easily create a .pdf with it as you could create an HTML page. It works on an XML based langauge and creates a new file of whatever format. Note that since XSLT is a transformation language, not a presentation language, it is NOT a stylesheet language.
XSL-FO is a markup language (not a stylesheet language) which has no semantics, only style information. It's intended to be the language from which you print an XML document, or to be a reliable style language from which to convert to other, more print-related formats, such as PDF. XSL-FO is print oriented but doesn't necessarily descriribe for print media, it may describe any style data.
By the use of the word XSL instead of XSLT/-FO, one indicates the combination of using XSLT for transformation, and XSL-FO for target language. Or at least, that's W3C's intention.
XSL-FO support is not at all bad - if you use more print oriented tools. There's many XSL-FO -> .pdf, RTF, Word, LaTeX converters, as well as XSL-FO printing tools. The support in browsers is null, but that's just good, because unlike print, the web is structure retaining, and in the convertion to XSL-FO you lose your original document structure. CSS on the other hand is nondestructive, and can be applied onto a structure, thus it's better than XSL-FO for medias that may contain metadata such as document structure.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.