Hammer Art
|
This is an example of how XSL Formatting Objects can be used to prepare a relatively complex document. The goal of this demonstration is to show that it is already possible to use XSL and XSL FO (XSLFO) in a production environment.
|
A detailed procedure from the source to the printable representation is given below:
- We start from a hypothetical XML document that represents an operation manual for a hammer: hammer.xml. It contains only bare contents, with no formatting.
- We apply an XSL stylesheet hammer.xsl to the source by running an XSLT processor -- e.g. SAXON by Michael Kay. The output of the transformation is written to a file hammer.fo (html version hammer.fo.html). Upon completion, this file contains a stream of XSL Formatting Objects that fully describe the visual presentation of the document.
- We now run XEP rendering engine on the stream. This creates a desired PDF file: hammer.pdf.
|
You can find more examples of XSL FO (XSLFO) documents, along with their PDF representations created by XEP, at sections chess and xmlspec on our site. Look also at our XSL FO (XSLFO) Test Suite.
|
|
|
|