Chapter, title, para example

<?xml version="1.0"?>
<xsl:stylesheet
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:fo="http://www.w3.org/1999/XSL/Format"
>

<xsl:include href="fo-root.xsl"/>

<xsl:template match="article">
  <fo:page-sequence font-family="serif" font-size="12pt">
    <xsl:apply-templates/>
  </fo:page-sequence>
</xsl:template>

<xsl:template match="chapter">
  <fo:flow>
    <xsl:apply-templates/>
  </fo:flow>
</xsl:template>

<xsl:template match="para">
  <fo:block space-before="6pt">
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

<xsl:template match="chapter/title">
  <fo:block font-family="sans-serif" color="blue"
         font-weight="bold" font-size="18pt"
         space-after="0.5em">
    <xsl:number level="multiple" count="chapter"/>
    <xsl:text> </xsl:text>
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

<xsl:template match="section/title">
  <fo:block font-family="sans-serif"
         font-weight="bold" font-size="16pt"
         space-after="0.5em">
    <xsl:number level="multiple" count="chapter|section"/>
    <xsl:text> </xsl:text>
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

<xsl:template match="article/title">
  <fo:block font-family="sans-serif" font-size="24pt"
         space-after="2pc">
    <xsl:apply-templates/>
  </fo:block>
</xsl:template>

</xsl:stylesheet>