]> granicus.if.org Git - docbook-dsssl/commitdiff
fix issue #41 Indexes in articles in a set collect index entries from other articles...
authorbobstayton <bobs@sagehill.net>
Sun, 15 Jul 2018 09:06:02 +0000 (02:06 -0700)
committerbobstayton <bobs@sagehill.net>
Sun, 15 Jul 2018 19:22:44 +0000 (12:22 -0700)
xsl/html/autoidx.xsl
xsl/html/index.xsl

index d0373d82a2adaad08eeba22e1c9e1fd37e64d7f4..c51bce33497b2d7b8deb9d490da21693a60b6d64 100644 (file)
 
 
 <xsl:template name="generate-index">
-  <xsl:param name="scope" select="(ancestor::d:book|/)[last()]"/>
+  <!-- these are all the elements that can contain an index element -->
+  <xsl:param name="scope" select="(ancestor::d:book 
+                                 | ancestor::d:appendix 
+                                 | ancestor::d:article 
+                                 | ancestor::d:chapter 
+                                 | ancestor::d:part 
+                                 | ancestor::d:preface 
+                                 | ancestor::d:sect1 
+                                 | ancestor::d:sect2 
+                                 | ancestor::d:sect3 
+                                 | ancestor::d:sect4 
+                                 | ancestor::d:sect5 
+                                 | ancestor::d:section 
+                                 | ancestor::d:set
+                                 | ancestor::d:topic 
+                                 |/)[last()]"/>
 
   <xsl:choose>
     <xsl:when test="$index.method = 'kosek'">
index 851e12a6f0415446ba04aefdc2ff0de2a3f4dc79..b310fd34af8b2dd0a4d9b94fc27e8ca436f6b724 100644 (file)
@@ -56,7 +56,6 @@
 
       <xsl:if test="count(d:indexentry) = 0 and count(d:indexdiv) = 0">
         <xsl:call-template name="generate-index">
-          <xsl:with-param name="scope" select="(ancestor::d:book|/)[last()]"/>
         </xsl:call-template>
       </xsl:if>
 
@@ -88,7 +87,6 @@
 
       <xsl:if test="count(d:indexentry) = 0 and count(d:indexdiv) = 0">
         <xsl:call-template name="generate-index">
-          <xsl:with-param name="scope" select="/"/>
         </xsl:call-template>
       </xsl:if>