3.2. Example 1: convert a DocBook document to multi-page HTML

Convert DocBook document help.xml to multi-page HTML created in directory docs/help/ (the docb.toHTML process command is found in XXE_install_dir/addon/config/docbook/xslMenu.incl).

$ convertdoc -p toc.section.depth 4 -p chunk.section.depth 2 \
    docb.toHTML help.xml \
    -u docs/help

Figure 5.1. Excerpts of docb.toHTML

  <command name="docb.toHTML">
    <process>
     .
     .
     .
        <parameter name="chunk.first.sections">1</parameter>
        <parameter name="chunk.section.depth">1</parameter>
        <parameter name="toc.section.depth">3</parameter>
        <parameter name="section.autolabel">1</parameter>
     .
     .
     .
     <upload base="%0/">
        <copyFiles files="*.*" toDir="." />
        <copyFiles files="resources/*" toDir="resources" />
        <copyFiles files="images/*" toDir="images" />
      </upload>
    </process>
  </command>

The docb.toHTML process command expects a save directory URL as its %0 argument. This %0 argument is passed to the process command using "-u docs/help".

It is possible to use a custom CSS style sheet to style the generated HTML by executing the following variant of the above command:

$ convertdoc -ru css ../common/css/online_help.css \
    -p toc.section.depth 4 -p chunk.section.depth 2 \
    docb.toHTML help.xml \
    -u docs/help

In the above example, the resource named "css" is replaced by the "../common/css/online_help.css" URL. This works because process command docb.toHTML has been specified as follows:

  <command name="docb.toHTML">
    <process>
      ...
      <copyProcessResources resources="xsl/css/html.css" to="html.css"
                            name="css" />
      ...
  </command>