Whole document tree There is a growing list of tools to process DocBook There is a growing list of tools to process DocBook documents using XSL stylesheets. Each tool implements parts or all of the XSL standard, which actually has several components:
To publish HTML from your XML documents, you just need an XSLT engine. To get to print, you need an XSLT engine to produce formatting objects (FO), which then must be processed with a formatting object processor to produce PostScript or PDF output. James Clark's XT was the first useful XSLT engine, and it is still in wide use. It is written in Java, so it runs on many platforms, and it is free ( http://www.jclark.com). XT comes with James Clark's nonvalidating parser XP, but you can substitute a different Java parser. Here is a simple example of using XT from the Unix command line to produce HTML: You'll need to alter your CLASSPATH environment variable to include the path to where you put the .jar files from the XT distribution. CLASSPATH=xt.jar:xp.jar:sax.jar export CLASSPATH java com.jclark.xsl.sax.Driver filename.xml docbook/html/docbook.xsl > output.html If you replace the HTML stylesheet with a formatting object stylesheet, XT will produce a formatting object file. Then you can convert that to PDF using FOP, a formatting object processor available for free from the Apache XML Project ( http://xml.apache.org). Here is an example of that two stage processing: CLASSPATH=xt.jar:xp.jar:sax.jar:fop.jar export CLASSPATH java com.jclark.xsl.sax.Driver filename.xml docbook/fo/docbook.xsl > output.fo java org.apache.fop.apps.CommandLine output.fo output.pdf As of this writing, some other XSLT processors to choose from include:
For print output, these additional tools are available for processing formatting objects:
|