 | Level: Intermediate Doug Tidwell (dtidwell@us.ibm.com), developerWorks Cyber Evangelist, IBM
04 Feb 2003 This tutorial teaches the basics of XSL Formatting Objects (XSL-FO), a powerful, flexible XML vocabulary for formatting data, often used with XSLT to convert XML and HTML documents to PDF (portable document format). The first of a two-part series, it uses XSLT to convert XML documents into formatting objects and then the Apache XML Project's FOP (Formatting Object to PDF) tool to convert those objects into PDF files. Examples include XSL-FO sample code, XSLT templates, and Java processing commands. Prerequisites
This tutorial assumes that you already comprehend the Extensible Markup Language (XML) and how to work with it and its related technologies, such as XML Stylesheet Language-Transformation (XSLT). You don't need to know anything about XSL-FO yet, but to work with formatting objects, you need a little experience working with XSLT. The tools used for the examples are written in the Java code, but you don't have to understand the Java language to use them. Although you can use other XSL-FO rendering engines, this tutorial is written for the Apache XML Project's FOP (Formatting Objects to PDF) translator. The examples in this tutorial work with FOP Version 0.20.4, which was released on July 5, 2002. If you try them with other versions of FOP, they may or may not work. The XSL-FO spec became an official recommendation of the W3C on 15 October 2001. The FOP tool supports most of the final spec. The second tutorial in this series is:
System requirements
To go through the exercises in this tutorial, you'll need a Java Developer's Kit (JDK) Version 1.3 or later, as well as the FOP package from the Apache XML Project. You can find the FOP package at xml.apache.org/dist/fop. Download the latest version and unzip it. Once you have the JDK and FOP installed, you need to set the classpath.
Duration
Under two hours
Formats html, pdf
|  | |  |