DocBook XSL Customization

The DocBook transformation is customized mostly by means of stylesheet parameters. Cascading Style Sheets can also be used to customize the DocBook transformation to HTML.

Stylesheet Parameters

Parameters for the DocBook transformation are specified in the same way as the HR-XSL parameters described in the section called “Stylesheet Parameters”.

Table 4.2, “DocBook XSL Stylesheet Parameters” lists some typical DocBook XSL parameters you might need when using HR-XSL. Note that this is only a small subset of the available DocBook XSL parameters; for a complete list, refer to the HTML Parameter Reference or, for PDF output, the FO Parameter Reference.

Table 4.2. DocBook XSL Stylesheet Parameters

ParameterDescriptionPossible Values
generate.tocWhether to include a table of contents in the CV or résuméarticle toc generates a table of contents; article nop suppresses it.
html.stylesheetThe value of this HTML-only parameter specifies a name for the CSS file. If not specified, no CSS file will be used in the HTML output.Any user-specified filename (e.g., style.css)
ulink.showFor HTML output, this option has no effect. For FO (e.g., PDF) output, this option controls whether the full URL should be printed after a hyperlink. (When the URL is identical to the hyperlink text, it is not printed, regardless of this setting.)0 suppresses the display of URLs; 1 shows them
paper.typeFor FO (e.g., PDF) output, this option controls the paper size conveniently.USletter (default), A4, and most of the standard A, B and C sizes. For a complete list, see the page.width.portrait documentation.
page.orientationFor PDF output, this option controls whether the longest edge should be horizontal (landscape) or vertical (portrait).portrait (default) or landscape

Note that some DocBook XSL parameters are complex and cannot be specified with the <xsl:param> element. Instead, you must specify them using the <xsl:attribute-set> element. For example, to change the font size of all Section 1 titles in PDF output, you would specify an attribute set for

<xsl:attribute-set name="">
    <xsl:attribute name="font-size">
        <xsl:value-of select="14"/>

Cascading Style Sheets

When generating an HTML version of the CV or résumé, Cascading Style Sheets can be used to customize its appearance. To do so:

  1. Specify a stylesheet file using the html.stylesheet parameter, as described in Table 4.2, “DocBook XSL Stylesheet Parameters”.
  2. Use HR-XSL to generate the HTML file.
  3. Create a CSS file with the same name as the parameter you specified and place it in the same directory as the HTML file.

Refer to the HR-XSL examples directory for examples of CSS files and how to specify them.