XML technologies / DocBook / Generating FO (PDF) / Formatting headings / Customizing with an attribute set

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

To change the appearance of section headings, for example, you usually only need to customize an attribute set. For a first-level section, the attribute set has the following content:

<xsl:attribute-set name="section.title.level1.properties">
    <xsl:attribute name="font-size">
        <xsl:value-of select="$body.font.master * 2.0736"/>
        <xsl:text>pt</xsl:text>
    </xsl:attribute>
</xsl:attribute-set>

To keep the font size but change the colour, add the following to your customization file:

<xsl:attribute-set name="section.title.level1.properties">
    <xsl:attribute name="color">#00664D</xsl:attribute>
</xsl:attribute-set>

This affects only the first level. To set the colour for all sections, use the attribute set section.properties:

<xsl:attribute-set name="section.properties">
    <xsl:attribute name="color">#00664D</xsl:attribute>
</xsl:attribute-set>

  

back to top