Just a note to remember that Docbook publishing on Windows isn’t as easy as on Linux, but still not that hard :
- Download FOP and Saxon
- Create a stylesheet fop.xsl :
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:import
href="http://docbook.sf.net/release/xsl/current/fo/docbook.xsl"/>
<xsl:param name="paper.type" select="'A4'"/>
<xsl:param name="fop.extensions" select="0"/>
<xsl:param name="fop1.extensions" select="1"/>
</xsl:stylesheet> - Create a batch :
saxon.jar -o GuideFoo.fo GuideFoo.xml E:\dev\dbk\fop.xsl
fop.bat -fo GuideFoo.fo -pdf GuideFoo.pdf
Notes :
- The fop extension defined in the XSL will allow bookmarks creation
- If you have images you may have to install JIMI, JAI for FOP too.
- It supposes that you have an good Internet connection and no proxy. Otherwise, you can download the Docbook XSL and for proxy, add “java -DproxySet=true -DproxyHost=proxy.provider.com -DproxyPort=3128 -jar”
- Some uses Ant to publish Docbook, it is very efficient. Makefile is also an option, there are examples in Docbook XSL distribution.
- Saxon isn’t the only choice, xsltproc may be faster, specially if you don’t use Saxon’s extensions.
Posted by Bruno Vernay
Posted by Bruno Vernay