Next / Previous / Contents / NM Tech homepage

4. What is a customization layer?

One of the great benefits of the DocBook-XSL Stylesheets is their modularity. If you don't like a style, you can start your own customization layer that makes changes to someone else's style, leaving intact the parts you don't want to change. The style described here is a customization layer built on top of the stock, uncustomized DocBook-XSL Stylesheets.

Specifically, you can do any of these things:

The procedure for building a customization layer is well-described on p. 102 of Stayton. Briefly:

  1. Create a subdirectory to hold the DocBook-XSL Stylesheets, currently:
  2. Download the stylesheets to that directory. First go to:

    Click on DocBook Project site, then on download file releases, then docbook-xsl. The download link is labeled Place this file in the parent directory above where you want the stylesheets install, and unzip it.

  3. Create a file whose name ends in .xsl to hold your customization layer, and set up your Makefile or other procedures to use this file as input to xsltproc.

  4. In this file, use xsl:import to read the layer you are building yours on—the stylesheets or the stock DocBook-XSL Stylesheets.

  5. Write templates to replace the parts of the layer under you that you don't like.