What’s the difference between XSLT and XSL-FO ?
Every resource I’ve read deal with them as if they were 1, or at least very closely tied..
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I was wondering about the basis of the question because I thought it was easy to answer, however as soon as you go here: http://www.w3.org/TR/xsl/ it becomes clear that its actually a good question – because pretty much the first thing on the page is this statement:
However, back in the real world, XSLT (which is also what most people will assume you mean by XSL) is a means for transforming XML documents into something else – that something else more often than not being another well structured document probably also formatted as XML (though I’ve used XSLT to render XML to csv and plain(ish) text).
XSL-FO on the other hand is about formatting – about laying out content on a page or a sequence of pages in a fairly strict fashion. Its useful because it allows you to manage content that is spread across multiple pages, its relatively straightforward to specify the format of a page (or even and odd pages) including headers, footers, borders, columns, etc and have your content flow into that. One would therefore take a load of data in, say, an XML format and then use XSLT to convert that data into a document consisting of XSL-FO that in turn is rendered using an appropriate tool in say PDF for print or other means of distribution.
The use case I have is to take a pile of tabular data, export that data as XML, render that into XSL-FO and from there to PDF which goes to a printer who turns said PDF into a 500 page directory. One specifies in the XSL-FO that one wants page numbers, page breaks in specific circumstances, that there is a table of contents and an index (each based on particular elements) and the rendering process (to PDF) handles filling in the page numbers across the board.
Hopefully you’re a bit less confused now..