<!-- ==================================================================== -->
+<!-- Set to 2 for backwards compatibility -->
+<xsl:param name="component.heading.level" select="2"/>
+
<xsl:template name="component.title">
<xsl:param name="node" select="."/>
+ <!-- This handles the case where a component (bibliography, for example)
+ occurs inside a section; will we need parameters for this? -->
+
+ <!-- This "level" is a section level. To compute <h> level, add 1. -->
<xsl:variable name="level">
<xsl:choose>
+ <!-- chapters and other book children should get <h1> -->
+ <xsl:when test="$node/parent::book">0</xsl:when>
<xsl:when test="ancestor::section">
<xsl:value-of select="count(ancestor::section)+1"/>
</xsl:when>
</xsl:choose>
</xsl:variable>
- <!-- Let's handle the case where a component (bibliography, for example)
- occurs inside a section; will we need parameters for this? -->
-
<xsl:element name="h{$level+1}">
<xsl:attribute name="class">title</xsl:attribute>
<xsl:call-template name="id.attribute"/>
<xsl:template match="preface">
<xsl:call-template name="id.warning"/>
- <div>
+ <xsl:element name="{$div.element}">
<xsl:call-template name="common.html.attributes">
<xsl:with-param name="inherit" select="1"/>
</xsl:call-template>
</xsl:if>
<xsl:apply-templates/>
<xsl:call-template name="process.footnotes"/>
- </div>
+ </xsl:element>
</xsl:template>
<xsl:template match="preface/title" mode="titlepage.mode" priority="2">
<xsl:template match="chapter">
<xsl:call-template name="id.warning"/>
- <div>
+ <xsl:element name="{$div.element}">
<xsl:call-template name="common.html.attributes">
<xsl:with-param name="inherit" select="1"/>
</xsl:call-template>
</xsl:if>
<xsl:apply-templates/>
<xsl:call-template name="process.footnotes"/>
- </div>
+ </xsl:element>
</xsl:template>
<xsl:template match="chapter/title|chapter/chapterinfo/title|chapter/info/title"
<xsl:call-template name="id.warning"/>
- <div>
+ <xsl:element name="{$div.element}">
<xsl:call-template name="common.html.attributes">
<xsl:with-param name="inherit" select="1"/>
</xsl:call-template>
<xsl:if test="not(parent::article) or $ischunk != 0">
<xsl:call-template name="process.footnotes"/>
</xsl:if>
- </div>
+ </xsl:element>
</xsl:template>
<xsl:template match="appendix/title|appendix/appendixinfo/title"
<xsl:template match="article">
<xsl:call-template name="id.warning"/>
- <div>
+ <xsl:element name="{$div.element}">
<xsl:call-template name="common.html.attributes">
<xsl:with-param name="inherit" select="1"/>
</xsl:call-template>
<xsl:apply-templates/>
<xsl:call-template name="process.footnotes"/>
- </div>
+ </xsl:element>
</xsl:template>
<xsl:template match="article/title|article/articleinfo/title" mode="titlepage.mode" priority="2">
<xsl:template match="topic">
<xsl:call-template name="id.warning"/>
- <div>
+ <xsl:element name="{$div.element}">
<xsl:call-template name="common.html.attributes">
<xsl:with-param name="inherit" select="1"/>
</xsl:call-template>
<xsl:apply-templates/>
<xsl:call-template name="process.footnotes"/>
- </div>
+ </xsl:element>
</xsl:template>
<xsl:template match="topic/title|topic/info/title" mode="titlepage.mode" priority="2">