0
  H   Cˆl–Ãa¾”ê_)â‚Æ�¸ÈTÅ£�þ\‘¡¬ÛL´†Jáüÿç„¯º÷æ_�uÐb&=LyE	ÿ~i£Äå ?÷     C<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                		xmlns:fo="http://www.w3.org/1999/XSL/Format"
                xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
                version='1.0'>

<!-- ********************************************************************

     This file is part of the XSL DocBook Stylesheet distribution.
     See ../README or http://cdn.docbook.org/release/xsl/current/ for
     copyright and other information.

     ******************************************************************** -->

<!-- ==================================================================== -->

<xsl:template match="section">
  <xsl:choose>
    <xsl:when test="$rootid = @id or $rootid = @xml:id">
      <xsl:call-template name="section.page.sequence"/>
    </xsl:when>
    <xsl:otherwise>
      <xsl:variable name="id">
        <xsl:call-template name="object.id"/>
      </xsl:variable>

      <xsl:variable name="renderas">
        <xsl:choose>
          <xsl:when test="@renderas = 'sect1'">1</xsl:when>
          <xsl:when test="@renderas = 'sect2'">2</xsl:when>
          <xsl:when test="@renderas = 'sect3'">3</xsl:when>
          <xsl:when test="@renderas = 'sect4'">4</xsl:when>
          <xsl:when test="@renderas = 'sect5'">5</xsl:when>
          <xsl:otherwise><xsl:value-of select="''"/></xsl:otherwise>
        </xsl:choose>
      </xsl:variable>

      <xsl:variable name="level">
        <xsl:choose>
          <xsl:when test="$renderas != ''">
            <xsl:value-of select="$renderas"/>
          </xsl:when>
          <xsl:otherwise>
            <xsl:call-template name="section.level"/>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:variable>

      <!-- xsl:use-attribute-sets takes only a Qname, not a variable -->
      <xsl:choose>
        <xsl:when test="$level = 1">
          <xsl:element name="fo:{$section.container.element}"
		       use-attribute-sets="section.level1.properties">
            <xsl:attribute name="id"><xsl:value-of 
                                select="$id"/></xsl:attribute>
            <xsl:call-template name="section.content"/>
          </xsl:element>
        </xsl:when>
        <xsl:when test="$level = 2">
          <xsl:element name="fo:{$section.container.element}"
		       use-attribute-sets="section.level2.properties">
            <xsl:attribute name="id"><xsl:value-of 
                                select="$id"/></xsl:attribute>
            <xsl:call-template name="section.content"/>
          </xsl:element>
        </xsl:when>
        <xsl:when test="$level = 3">
          <xsl:element name="fo:{$section.container.element}"
                       use-attribute-sets="section.level3.properties">
            <xsl:attribute name="id"><xsl:value-of 
                                select="$id"/></xsl:attribute>
            <xsl:call-template name="section.content"/>
          </xsl:element>
        </xsl:when>
        <xsl:when test="$level = 4">
          <xsl:element name="fo:{$section.container.element}"
                       use-attribute-sets="section.level4.properties">
            <xsl:attribute name="id"><xsl:value-of 
                                select="$id"/></xsl:attribute>
            <xsl:call-template name="section.content"/>
          </xsl:element>
        </xsl:when>
        <xsl:when test="$level = 5">
          <xsl:element name="fo:{$section.container.element}"
		       use-attribute-sets="section.level5.properties">
            <xsl:attribute name="id"><xsl:value-of 
                                select="$id"/></xsl:attribute>
            <xsl:call-template name="section.content"/>
          </xsl:element>
        </xsl:when>
        <xsl:otherwise>
          <xsl:element name="fo:{$section.container.element}"
		       use-attribute-sets="section.level6.properties">
            <xsl:attribute name="id"><xsl:value-of 
                                select="$id"/></xsl:attribute>
           