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.
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
Parameter | Description | Possible Values |
---|---|---|
generate.toc | Whether to include a table of contents in the CV or résumé | article toc generates a table of contents; article nop suppresses it. |
html.stylesheet | The 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.show | For 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.type | For 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.orientation | For 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 section.title.level1.properties
:
<xsl:attribute-set name="section.title.level1.properties"> <xsl:attribute name="font-size"> <xsl:value-of select="14"/> <xsl:text>pt</xsl:text> </xsl:attribute> </xsl:attribute-set>
When generating an HTML version of the CV or résumé, Cascading Style Sheets can be used to customize its appearance. To do so:
html.stylesheet
parameter, as described in Table 4.2, “DocBook XSL Stylesheet Parameters”.
Refer to the HR-XSL examples
directory for examples of CSS files and how to specify them.