XML technologies / DocBook / The DocBook XSL stylesheets / Adjusting output with processing instructions

(Excerpt from "DocBook-XML: Media-neutral and platform-independent publishing" by Thomas Schraitle)

The DocBook stylesheets use processing instructions (Processing instructions, PIs) for various purposes. The following types exist:  

Table: Processing instructions for output formats

PI

Output format

Description

Format-dependent processing instructions

<?dbfo PARAM?>

XSL-FO

For XSL-FO output.

<?dbhh PARAM?>

HTMLHelp

For HTMLHelp output; not covered in this book.

<?dbhtml PARAM?>

Online

For (X)HTML, Javahelp and Eclipse output.

Format-independent processing instructions

<?dbtimestamp PARAM?>

Online, XSL-FO

Inserts dates and times; see Inserting the current date and time.

<?dbchoice PARAM?>

Online, XSL-FO

creates a localized version of and or or

The placeholder PARAM represents data for the respective processing instruction. The syntax is: Name="Wert". For a complete list, see DocBook XSL Stylesheets User Reference: PIs.

Certain properties can be controlled for each output format. For example, this processing instruction controls how a variable list is rendered:

Example: Processing instructions for (X)HTML and XSL-FO

<variablelist>
   <?dbhtml list-presentation="table"?>
   <?dbfo list-presentation="blocks"?>
  <varlistentry> ... </varlistentry>
</variablelist>

The processing instruction <?dbhtml?> renders the list in (X)HTML using the element table whereas <?dbfo?> uses a fo:block element for XSL-FO output.

Processing instructions apply only to their containing element. They typically specify width, background color, spacing and similar output-specific properties, potentially overriding global parameters.

  

back to top