Chapter 2. Installation and Setup

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, the Section called 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 are 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 get errors of the form:

    jade:jtest.dsl:1:72:W: cannot generate system identifier for public
    text "-//James Clark//DTD DSSSL Style Sheet//EN"
    jade:jtest.dsl:1:72:E: reference to entity "STYLE-SHEET" for which no
    system identifier could be generated
    jade:jtest.dsl:1:0: entity was defined here
    jade:jtest.dsl:1:72:E: DTD did not contain element declaration for
    document type name
    jade:jtest.dsl:2:12:E: element "STYLE-SHEET" undefined
    jade:jtest.dsl:3:20:E: element "STYLE-SPECIFICATION" undefined
    jade:jtest.dsl:4:25:E: element "STYLE-SPECIFICATION-BODY" undefined
    jade:E: specification document does not have the DSSSL architecture
    as a base architecture

    You probably need to setup the SGML_CATALOG_FILES path, as described below.

  3. If you encounter other warnings or errors, Jade is not installed 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 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 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:

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

    Note: If you are on a UNIX system, the catalog file separator in SGML_CATALOG_FILES is the colon, not the semicolon.

    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:

    nsgmls -sv test.sgm
    The nsgmls program is a stand-alone SGML parser included in the current Jade distribution (in previous distributions, it was called nsgmlsu).

    If the nsgmls 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

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 you get errors indicating that a capacity has been exceeded (...must not exceed LITLEN or ...must not exceed GRPCNT, etc.), you are probably using the wrong declaration. Try the test again, with an explicit declaration:

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

    If errors persist, 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.