]> granicus.if.org Git - docbook-dsssl/commitdiff
Support optional title on section ToCs. Optional titles for components, books, and...
authorNorman Walsh <ndw@nwalsh.com>
Fri, 4 Oct 2002 12:09:31 +0000 (12:09 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Fri, 4 Oct 2002 12:09:31 +0000 (12:09 +0000)
xsl/fo/autotoc.xsl
xsl/fo/sections.xsl

index bf5267b92c5248fbe50ca4acf2a0df4ba7a0db35..3b1a40fea7427cd583c1eac648b32415a4f89a88 100644 (file)
@@ -99,6 +99,7 @@
 
 <xsl:template name="section.toc">
   <xsl:param name="toc-context" select="."/>
+  <xsl:param name="toc.title.p" select="true()"/>
 
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
     <fo:block id="toc...{$id}"
               xsl:use-attribute-sets="toc.margin.properties">
 
-      <xsl:call-template name="section.heading">
-        <xsl:with-param name="level" select="$level + 1"/>
-        <xsl:with-param name="title">
-          <fo:block space-after="0.5em">
-            <xsl:call-template name="gentext">
-              <xsl:with-param name="key" select="'TableofContents'"/>
-            </xsl:call-template>
-          </fo:block>
-        </xsl:with-param>
-      </xsl:call-template>
+      <xsl:if test="$toc.title.p">
+        <xsl:call-template name="section.heading">
+          <xsl:with-param name="level" select="$level + 1"/>
+          <xsl:with-param name="title">
+            <fo:block space-after="0.5em">
+              <xsl:call-template name="gentext">
+                <xsl:with-param name="key" select="'TableofContents'"/>
+              </xsl:call-template>
+            </fo:block>
+          </xsl:with-param>
+        </xsl:call-template>
+      </xsl:if>
 
       <xsl:apply-templates select="$nodes" mode="toc">
         <xsl:with-param name="toc-context" select="$toc-context"/>
index 49fdd24205d0ca338f327a9fe7fa1447553fa17a..eaee464a680f01ec436d36a1fb20b2580dedaa30 100644 (file)
@@ -32,7 +32,9 @@
     <xsl:if test="(contains($toc.params, 'toc')
                    and (count(ancestor::section)+1) &lt;= $generate.section.toc.level)
                   or refentry">
-      <xsl:call-template name="section.toc"/>
+      <xsl:call-template name="section.toc">
+        <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
+      </xsl:call-template>
     </xsl:if>
 
     <xsl:apply-templates/>