Transforming a Document into a 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 to apply the style sheet planets.xsl. You can do that using the XSLT techniques we saw in the previous chapter. For example, to use the xslt Java class I created in that chapter, you first set the class path to include the alphaWorks' xalan.jar and xerces.jar files, something like this:

%set classpath=%classpath%;C:\lotusxsl_1_0_1\xalan.jar;C:\xsl\lotusxsl_1_0_1\xerces.jar;

Then you apply planets.xsl to planets.xml to produce planets.fo:

%java xslt planets.xml planets.xsl planets.fo

The document planets.fo uses the XSL formatting objects to specify how the document should ...

Get Inside XML 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.