The Modular DocBook Stylesheets
PrevInstallation and SetupNext

Table of Contents
Installing Jade
Installing the DocBook DTD
Installing the Modular DocBook Stylesheets

In order to process DocBook documents with these stylesheets, you must get three separate components installed and configured correctly:

For simplicity, these instructions assume that you are working with Jade on a Microsoft Windows machine. These instructions should be just as useful if you are working on a non-M$ platform, modulo the normal cross-platform idiosyncracies (path and filename separator characters, use of drive letters, etc.)

If you are using another DSSSL processor, Installing the DocBook DTD may still be helpful, but most of the rest probably won't apply.

Installing Jade

  1. Download and unpack the Jade distribution. Binary distributions are available for some platforms, including Microsoft Windows, which makes installation a simple matter of unpacking the distribution. For other platforms, you will need to build Jade from sources. Please consult the documentation that comes with Jade for more detailed installation instructions.

    You may wish to add the directory where you installed Jade to your PATH. If not, make sure that you use the fully qualified name of the executable when you try to run the commands below.

  2. Download jtest.sgm and jtest.dsl. These self-contained test documents. Test Jade by running:

    jade -t rtf -d jtest.dsl jtest.sgm

    This command should silently produce jtest.rtf. If you encounter warnings or errors here, you have not installed Jade correctly.

Installing the DocBook DTD

  1. Download and unpack the DocBook DTD distribution. Please consult the documentation that comes with DocBook for more detailed installation instructions.

  2. The DocBook DTD is composed of several modules. In order for SGML tools on your system to find these modules, you will need to setup an SGML Open catalog file that maps the public identifiers used in DocBook to local system identifiers. The DocBook distribution comes with a default catalog called docbook.cat which is probably sufficient.

    Note, however, that Jade does not understand the DTDDECL directive in catalog files and will issue a warning if you use docbook.cat unchanged.

  3. In order to find your catalog files, Jade, nsgmlsu, and the other tools in the Jade distribution examine the SGML_CATALOG_FILES environment variable. This variable should contain a PATH-like list of the catalog files on your system. I have combined the catalog from the DocBook distribution and several other DTDs that I use frequently into a single catalog in d:/share/sgml/catalog, so I set my SGML_CATALOG_FILES variable to:

    ./catalog;d:/share/sgml/catalog;c:/jade/catalog;
    If you are using only Jade and the DocBook DTD on your system, this setting should be sufficient:
    c:/docbook/docbook.cat;c:/jade/catalog
    assuming that you have the DocBook DTD installed in c:\docbook and Jade installed in c:\jade.

    One mistake that I frequently make the first time I try to install Jade somewhere new is to set the SGML_CATALOG_FILES variable to the list of directories that contain catalog files rather than the list of catalog files. That doesn' t work, it has to be a list of the actual catalog files.

    Another wrinkle to be aware of is that Jade will also search the catalog files for the SGMLDECL entry which specifies the default SGML Declaration to use. On my system, I have several doctypes that don't use the declaration identified as the default in one of my catalog files, so I have to explicitly include the proper declaration when I format those documents.

  4. To test your installation, download test.sgm and run following command:

    nsgmlsu -sv test.sgm
    The nsgmlsu program is a stand-alone SGML parser included in the Jade distribution.

    If the nsgmlsu command produces errors, review your catalog and resolve the errors:

    • Ignore warnings about DTDDECL being unsupported. It is unsupported, and there's no way to disable the warning message. Note, however, that this may also effect which SGML declaration gets used. When in doubt, pass the correct declaration explicitly and see if that corrects any problems. (To parse test.sgm with the declaration docbook.dcl explicitly, run nsgmls -sv docbook.dcl test.sgm.)

    • If you are missing some of the ISO entity sets, they are available on the web at http://www.sil.org/sgml/topics.html#entities

Installing the Modular DocBook Stylesheets

  1. Download and unpack the stylesheet distribution.

  2. Test the installation by processing test.sgm (from the previous section) with Jade:

    jade -t rtf -d d:\where-you-unpacked-the-stylesheets\docbook\print\docbook.dsl test.sgm

    This command should silently produce test.rtf. If not, and the preceding test succeeded, something has gone wrong—contact the maintainer.

    To test the HTML stylesheet, run

    jade -t sgml -d d:\where-you-unpacked-the-stylesheets\docbook\html\docbook.dsl test.sgm

    This command should silently produce c01.htm. If not, and the preceding test succeeded, something has gone wrong—contact the maintainer.


PrevHomeNext
The Modular DocBook Stylesheets Customizing the Stylesheets