Transforming a Document into Formatting Object Form
To transform planets.xml into a document that uses formatting objects, which I’ll call planets.fo, all I have to do is apply the stylesheet planetsPDF.xsl. You can do that using the XSLT techniques you already saw in this chapter.
For example, to use Xalan to create planets.fo, you first set the classpath something like this in Windows:
C:\>set classpath=c:\xalan\xalan-j_2_0_0\bin\xalan.jar; c:\xalan\xalan-j_2_0_0\bin\xerces.jar
Then you apply planetsPDF.xsl to planets.xml to produce planets.fo:
C:\planets>java org.apache.xalan.xslt.Process -IN planets.xml -XSL planetsPDF.xsl -OUT planets.fo ...
Get Inside XSLT now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.