XML technologies / DocBook / The DocBook XSL stylesheets / Working with shared templates / Changing formatting

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

For recurring formatting such as bold or italics, the FO and HTML stylesheets provide named templates. They format the supplied text and account for writing direction (attribute dir), XLinks and any annotations. These are the template names:  

 

Table: Font styles as format-independent template names

Template name

Description

inline.charseq

no formatting change

inline.monoseq

uses a monospaced font

inline.boldseq

uses bold

inline.italicseq

uses italics

inline.boldmonoseq

uses a bold monospaced font

inline.italicmonoseq

uses an italic monospaced font

inline.superscriptseq

generates superscript text

inline.subscriptseq

generates subscript text  

Use xsl:call-template to invoke the corresponding named template:

<xsl:template match="command|d:command">
  <xsl:call-template name="inline.boldmonoseq"/>
</xsl:template>

  

back to top