Specifying Parameters

There are a number of parameters available in the stylesheets which you can set to customize the generated html. An exhaustive list is available in the following sections, but we will go over a few of the more commonly used ones in this section.

To specify a parameter to the stylesheets, use the --stringparam option of the xsltproc application.

db.chunk.chunk_top

Set this parameter to 1 if you want the stylesheets to chunk1 the top level element (<article> or <book>) into a file called index.xhtml.

db.chunk.max_depth

Specifies the maximum depth of chunked elements specified in db.chunk.chunks parameter.

db.chunk.extension

Set this parameter to the extension you would like for the chunked output files.

Example 2Example of specifying stylesheet parameters

$ xsltproc \
   --stringparam db.chunk.chunk_top 1        \
   --stringparam db.chunk.max_depth 1        \
   --stringparam db.chunk.extension '.html'  \
   /usr/share/xml/gnome/xslt/docbook/html/db2html.xsl \
   <path to docbook file>
Example 2 will chunk the top level element, chunk to a maximum depth of 1 and chunk the title page.

1

Chunking refers to creating a separate output file for an element. For example, if there are three <sect1> elements within a document, (with no subsections) then there will be three files generated for each element. Incidentally, the name of the files will be the same as the element's id attribute.