Chapter 8. Generating documentation

Table of Contents
8.1. OpenBSD
8.2. Using makefile

This chapter describes how to process DocBook XML documentation into other formats such as: HTML, RTF.

8.1. OpenBSD

First you need install openjade and dockbook-* packages. This packages allows you to process SGML documents into some formats. Sadly (as in 3.6 release) there is no package with DocBook XML style-sheets so you need to download appropriate.

I used files from Fedora Core 2 release (packages: docbook-style-dsssl-1.78-2.noarch.rpm and docbook-dtds-1.0-22.1.noarch.rpm). I unpacked them with rpm2cpio, copied everything from usr/share/ to /usr/local/share/sgml/redhat. Then added following lines:

Example 8-1. Content of catalog file

CATALOG "redhat/sgml/docbook/xml-dtd-4.1.2-1.0-22.1/catalog"
CATALOG "redhat/sgml/docbook/xml-dtd-4.2-1.0-22.1/catalog"
CATALOG "redhat/sgml/docbook/dsssl-stylesheets/catalog" 

to /usr/local/share/sgml/catalog.

Then using following application I was able to create RTF version of documentation:

env SGML_CATALOG_FILES=/usr/local/share/sgml/catalog 
openjade -t rtf -d /usr/local/share/sgml/docbook/dsssl/modular/html/docbook.dsl 
/usr/local/share/sgml/docbook/dsssl/modular/dtds/decls/xml.dcl ../index.xml

Changing rtf to sgml produces HTML files.

Note: openjade may print warnings about DTDDECL which is not supported but you should ignore them.

Hosted by: BerliOS Logo Logo