]> granicus.if.org Git - docbook-dsssl/commitdiff
Further refinement to cause nested QandASet to appear in top-level
authorMichael Smith <xmldoc@users.sourceforge.net>
Tue, 22 Aug 2006 07:30:45 +0000 (07:30 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Tue, 22 Aug 2006 07:30:45 +0000 (07:30 +0000)
TOC. Patch from Daniel Leidert. Closes patch #1509018.

xsl/html/qandaset.xsl

index 722358c937e4e5adf38edd4fd992a550e71b8159..fe399f5a0b7e0117dd66a24284623142a54c22f4 100644 (file)
@@ -38,7 +38,8 @@
 
   <div class="{name(.)}">
     <xsl:apply-templates select="$title"/>
-    <xsl:if test="(contains($toc.params, 'toc') and $toc != '0') or $toc = '1'">
+    <xsl:if test="((contains($toc.params, 'toc') and $toc != '0') or $toc = '1')
+                  and not(ancestor::answer and not($qanda.nested.in.toc=0))">
       <xsl:call-template name="process.qanda.toc"/>
     </xsl:if>
     <xsl:apply-templates select="$preamble"/>
 <xsl:template name="process.qanda.toc">
   <!-- * if user wants nested qandaset and qandaentry in main Qandaset TOC, -->
   <!-- * then don't also include the nested stuff in the sub TOCs -->
-  <xsl:if test="not($qanda.nested.in.toc = 0) and not(ancestor::answer)">
   <dl>
     <xsl:apply-templates select="qandadiv" mode="qandatoc.mode"/>
     <xsl:apply-templates select="qandaset|qandaentry" mode="qandatoc.mode"/>
   </dl>
-  </xsl:if>
 </xsl:template>
 
 <xsl:template match="qandadiv" mode="qandatoc.mode">