More Resources
Table of Contents
More Resources
Editing the XSL Stylesheet

Add XSL styling to the custom.xsl file to tell the build file to use the new fonts for the specific sections.
You want to tell the build file to use the custom fonts.

  1. Open the custom-attrs.xsl file (located in cfg/fo/attrs/).

    Expected Result
    The XSL stylesheet has no content.
  2. To change the font for the header, insert the following code:

    Example
    < xsl:attribute-set name="common.title"> 
    	< xsl:attribute name="font-family"> {font_description}< /xsl:attribute> 
    < /xsl:attribute-set> 

  3. To change the font for the body, insert the following code:

    Example
    < xsl:attribute-set name="__fo__root"> 
    	< xsl:attribute name="font-family"> {font_description}< /xsl:attribute> 
    < /xsl:attribute-set> 

  4. Replace {font_description} with the logical-font name created in Adding Custom Fonts to the XML.
DITA associates the headers and body with the new fonts.