Skip to content

Commit 5d3cc2c

Browse files
author
Sanders Kleinfeld
committed
Adding toc.section.depth parameters to tocgen templates for XSpec purposes.
1 parent 74da8b8 commit 5d3cc2c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

htmlbook-xsl/tocgen.xsl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@
1313

1414
<!-- Default rule for TOC generation -->
1515
<xsl:template match="*" mode="tocgen">
16+
<xsl:param name="toc.section.depth" select="$toc.section.depth"/>
1617
<xsl:apply-templates select="*" mode="tocgen"/>
1718
</xsl:template>
1819

1920
<xsl:template match="h:section[not(@data-type = 'dedication' or @data-type = 'titlepage' or @data-type = 'toc' or @data-type = 'colophon' or @data-type = 'copyright-page' or @data-type = 'halftitlepage')]|h:div[@data-type='part']" mode="tocgen">
21+
<xsl:param name="toc.section.depth" select="$toc.section.depth"/>
2022
<xsl:choose>
2123
<!-- Don't output entry for section elements at a level that is greater than specified $toc.section.depth -->
2224
<xsl:when test="self::h:section[contains(@data-type, 'sect') and htmlbook:section-depth(.) != '' and htmlbook:section-depth(.) &gt; $toc.section.depth]"/>

0 commit comments

Comments
 (0)