]> granicus.if.org Git - docbook-dsssl/commitdiff
Fixed logic for turning on qandaset/qandadiv TOCs with
authorBob Stayton <bobs@sagehill.net>
Mon, 4 Aug 2003 17:48:04 +0000 (17:48 +0000)
committerBob Stayton <bobs@sagehill.net>
Mon, 4 Aug 2003 17:48:04 +0000 (17:48 +0000)
generate.toc param or dbhtml toc PI.

xsl/html/qandaset.xsl

index 4a46cf675d96beefdb3c3d01d541490bbfcdfc23..e70c6bb919fca2ec6fcac43c823e3aa980a5e14b 100644 (file)
@@ -70,7 +70,7 @@
 
   <div class="{name(.)}">
     <xsl:apply-templates select="$title"/>
-    <xsl:if test="contains($toc.params, 'toc') and $toc = '1'">
+    <xsl:if test="(contains($toc.params, 'toc') and $toc != '0') or $toc = '1'">
       <xsl:call-template name="process.qanda.toc"/>
     </xsl:if>
     <xsl:apply-templates select="$preamble"/>
     </tr>
   </xsl:if>
 
+  <xsl:variable name="toc">
+    <xsl:call-template name="dbhtml-attribute">
+      <xsl:with-param name="pis"
+                      select="processing-instruction('dbhtml')"/>
+      <xsl:with-param name="attribute" select="'toc'"/>
+    </xsl:call-template>
+  </xsl:variable>
+
   <xsl:variable name="toc.params">
     <xsl:call-template name="find.path.params">
       <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
     </xsl:call-template>
   </xsl:variable>
-  <xsl:if test="contains($toc.params, 'toc')">
+
+  <xsl:if test="(contains($toc.params, 'toc') and $toc != '0') or $toc = '1'">
     <tr class="toc" colspan="2">
       <td align="left" valign="top" colspan="2">
         <xsl:call-template name="process.qanda.toc"/>