Chapter 3: FOP


Overview

XSLT is part one of a two-part specification for an extensible stylesheet language. XSLT takes care of rearranging trees of XML into different trees of potentially different kinds of XML. That’s very useful by itself, and that’s one of the reasons (the other being the sheer size of the specifications) that XSLT was broken out into its own specification. The second part of the specification is called Extensible Stylesheet Language (XSL) and focuses on formatting XML once the tree transformations have been applied. XSL defines a concept known as formatting objects, which is an XML vocabulary that serves as input to a formatter; the formatter then formats the data contained in the formatting objects for presentation. You may also see XSL referred to as XSL-FO (XSL-formatting objects). The two acronyms refer to the same pieces of technology.

The Apache XML Project has an XSL formatting object formatter called FOP (Formatting Object Processor). The processor was originally written by James Tauber and was one of the seed projects for the Apache XML Project. Since then a number of other developers have joined the development team for FOP.

FOP is a worthwhile piece of software if your interest in XML is more from the publishing side. You can use XSLT to take XML and put it into XML-derived online formats like HTML and SVG, but you reach the limit when you need to output something that isn’t XML. FOP and XSL formatting objects are the way you can use XML to deliver the same content in multiple presentations, especially in the area of printing. The general way this works is that you use XSLT to convert your XML into XSL formatting objects, and then you use FOP and the appropriate output target to produce output in the format of your choice. FOP has support for PDF, PCL, PostScript, SVG, some of FrameMaker MIF, and some text. If you need to dynamically generate any of these output formats, then FOP should be able to help. In addition to the publishing uses for FOP, applications that generate billing statements, invoices, and similar documents can use FOP to produce their output.




Professional XML Development with Apache Tools. Xerces, Xalan, FOP, Cocoon, Axis, Xindice
Professional XML Development with Apache Tools: Xerces, Xalan, FOP, Cocoon, Axis, Xindice (Wrox Professional Guides)
ISBN: 0764543555
EAN: 2147483647
Year: 2003
Pages: 95

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net