Copyright © 2004-2011 Berndt E. Schwerdtfeger
First published 2004-07-19
|updated to FOP version 1.0|
Table of Contents
This article describes how to install a documentation system based on DocBook XML on a Windows system.
In this paper I describe how to install a professional documentation system on a Windows platform, which is based on the DocBook and XML standards. I will not explain how to write DocBook XML source text. Instead you might want to look up the DocBook Wiki as a good source for books, tutorials and other DocBook documentation.
My goal is to describe the environment, including its installation and configuration, and give some examples of its usage.
This new revision reflects new releases of required packages and updates the hyperlinks to the Internet. Updated versions have been published in 2005 and 2007, the revision history has been shortend. The document is now under subversion control.
I assume that you
You can download the up-to-date version of Java from the Free Java Download site at Oracle .
The same source document written in DocBook XML can be used to produce pdf or HTML output through the same formatting objects processor FOP. Internally this is done in two steps as a transformation and a formatting.
The necessary packages are available under the Apache License. The appropriate web sites for downloading these packages will be given below.
The following packages are required
The latest version of DocBook is 5.1. The release 5.0 was a complete rewrite in RELAX NG. In this paper I will continue to use DocBook V4.5 (released 2006-10-03). The DocBook stylesheets are at version 1.76.1 (released 2010-11-01). The stable release 1.0 of Apache FOP was released 2010-07-21.
Unpack the zip archives into some convenient place. On my system I have chosen the directories
You need to do three things
JAVA_HOMEto the path pointing to your Java installation
On my system I have set
PATH as well as
The generation of HTML output is performed by
The generation of pdf output is performed by
[-param paper.type A4] [-param ulink.footnotes 1] [-param fop1.extensions 1]
The last three optional parameters set the paper size to A4 format, set the url references to footnotes and generate pdf bookmarks.
This is the listing of my makefile
to generate this very document
# makefile for building xdocenv # $Date: 2011-04-29 13:25:54 +0200 (Fri, 29 Apr 2011) $ $Revision: 158 $ source = xdocenv.xml xdocgen.xml xdocins.xml xdocfop.xml all : html pdf install : all copy copy : cp xdocenv.pdf xdocenv.html \ c:/progra~1/apache~1/apache2.2/htdocs/doku/xdocenv html : xdocenv.html xdocenv.html : $(source) fop -xml xdocenv.xml \ -xsl /xml/docbook-xsl-1.76.1/html/docbook.xsl \ -foout xdocenv.html pdf : xdocenv.pdf xdocenv.pdf : $(source) fop -xml xdocenv.xml \ -xsl /xml/docbook-xsl-1.76.1/fo/docbook.xsl \ -param paper.type A4 \ -param ulink.footnotes 1 \ -param fop1.extensions 1 \ -pdf xdocenv.pdf .PHONY : clean clean : rm -f xdocenv.pdf xdocenv.html