]> granicus.if.org Git - docbook-dsssl/commitdiff
Bug #1046371 - chunk children of Part
authorMichael Smith <xmldoc@users.sourceforge.net>
Thu, 14 Oct 2004 17:11:03 +0000 (17:11 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Thu, 14 Oct 2004 17:11:03 +0000 (17:11 +0000)
Problem:
  Glossary, Bibliography, and Index were not getting chunked when
  they occurred as children of Part. They should be, because other
  components (Chapter, Article, Appendix, etc.) within Part are
  chunked.

Fix:
  Added code to have Part chunked in same manner as Book and
  Article.

Areas affected:
  Chunking (no effect on non-chunked output) + manifest

Notes:
  Discovered a different bug when testing this (bug #1047151):
  content of indexes within components sometimes end up being
  identical to content of the master index for the whole division
  they are a part of (e.g., the whole Book or Set)

xsl/html/chunk-code.xsl
xsl/html/chunk-common.xsl
xsl/html/manifest.xsl

index 6513c1c7a0ba312aa2c245fdd60a83ac57cd58ea..17213fcd5702d7f0ab259018822492aa356195c0 100644 (file)
              |preceding::refentry[1]
              |preceding::colophon[1]
              |preceding::article[1]
-             |preceding::bibliography[parent::article or parent::book][1]
-             |preceding::glossary[parent::article or parent::book][1]
+             |preceding::bibliography[parent::article or parent::book or parent::part][1]
+             |preceding::glossary[parent::article or parent::book or parent::part][1]
              |preceding::index[$generate.index != 0]
-                              [parent::article or parent::book][1]
+                              [parent::article or parent::book or parent::part][1]
              |preceding::setindex[$generate.index != 0][1]
              |ancestor::set
              |ancestor::book[1]
              |following::reference[1]
              |following::refentry[1]
              |following::colophon[1]
-             |following::bibliography[parent::article or parent::book][1]
-             |following::glossary[parent::article or parent::book][1]
+             |following::bibliography[parent::article or parent::book or parent::part][1]
+             |following::glossary[parent::article or parent::book or parent::part][1]
              |following::index[$generate.index != 0]
-                              [parent::article or parent::book][1]
+                              [parent::article or parent::book or parent::part][1]
              |following::article[1]
              |following::setindex[$generate.index != 0][1]
              |descendant::book[1]
              |descendant::chapter[1]
              |descendant::appendix[1]
              |descendant::article[1]
-             |descendant::bibliography[parent::article or parent::book][1]
-             |descendant::glossary[parent::article or parent::book][1]
+             |descendant::bibliography[parent::article or parent::book or parent::part][1]
+             |descendant::glossary[parent::article or parent::book or parent::part][1]
              |descendant::index[$generate.index != 0]
-                              [parent::article or parent::book][1]
+                              [parent::article or parent::book or parent::part][1]
              |descendant::colophon[1]
              |descendant::setindex[$generate.index != 0][1]
              |descendant::part[1]
              |preceding::refentry[1]
              |preceding::colophon[1]
              |preceding::article[1]
-             |preceding::bibliography[parent::article or parent::book][1]
-             |preceding::glossary[parent::article or parent::book][1]
+             |preceding::bibliography[parent::article or parent::book or parent::part][1]
+             |preceding::glossary[parent::article or parent::book or parent::part][1]
              |preceding::index[$generate.index != 0]
-                              [parent::article or parent::book][1]
+                              [parent::article or parent::book or parent::part][1]
              |preceding::setindex[$generate.index != 0][1]
              |ancestor::set
              |ancestor::book[1]
              |following::reference[1]
              |following::refentry[1]
              |following::colophon[1]
-             |following::bibliography[parent::article or parent::book][1]
-             |following::glossary[parent::article or parent::book][1]
+             |following::bibliography[parent::article or parent::book or parent::part][1]
+             |following::glossary[parent::article or parent::book or parent::part][1]
              |following::index[$generate.index != 0]
                               [parent::article or parent::book][1]
              |following::article[1]
              |descendant::appendix[1]
              |descendant::article[1]
              |descendant::bibliography[parent::article or parent::book][1]
-             |descendant::glossary[parent::article or parent::book][1]
+             |descendant::glossary[parent::article or parent::book or parent::part][1]
              |descendant::index[$generate.index != 0]
                               [parent::article or parent::book][1]
              |descendant::colophon[1]
                      |article
                      |reference|refentry
                      |book/glossary|article/glossary|part/glossary
-                     |book/bibliography|article/bibliography
+                     |book/bibliography|article/bibliography|part/bibliography
                      |colophon">
   <xsl:choose>
     <xsl:when test="$onechunk != 0 and parent::*">
 
 <xsl:template match="setindex
                      |book/index
-                     |article/index">
+                     |article/index
+                     |part/index">
   <!-- some implementations use completely empty index tags to indicate -->
   <!-- where an automatically generated index should be inserted. so -->
   <!-- if the index is completely empty, skip it. -->
index 66d25e334342b8c0bcfd58dd7e5d23c83d20db58..2d914b7ca2af595348e28be95ed72e4211907694 100644 (file)
        The root element
        appendix
        article
-       bibliography  in article or book
+       bibliography  in article or part or book
        book
        chapter
        colophon
-       glossary      in article or book
-       index         in article or book
+       glossary      in article or part or book
+       index         in article or part or book
        part
        preface
        refentry
     <xsl:when test="name($node)='refentry'">1</xsl:when>
     <xsl:when test="name($node)='index' and $generate.index != 0
                     and (name($node/parent::*) = 'article'
-                         or name($node/parent::*) = 'book')">1</xsl:when>
+                    or name($node/parent::*) = 'book'
+                    or name($node/parent::*) = 'part'
+                    )">1</xsl:when>
     <xsl:when test="name($node)='bibliography'
                     and (name($node/parent::*) = 'article'
-                         or name($node/parent::*) = 'book')">1</xsl:when>
+                    or name($node/parent::*) = 'book'
+                    or name($node/parent::*) = 'part'
+                    )">1</xsl:when>
     <xsl:when test="name($node)='glossary'
                     and (name($node/parent::*) = 'article'
-                         or name($node/parent::*) = 'book')">1</xsl:when>
+                    or name($node/parent::*) = 'book'
+                    or name($node/parent::*) = 'part'
+                    )">1</xsl:when>
     <xsl:when test="name($node)='colophon'">1</xsl:when>
     <xsl:when test="name($node)='book'">1</xsl:when>
     <xsl:when test="name($node)='set'">1</xsl:when>
index 0f10f6017b1292f02ceb1c9d6c2e729d2a223a5a..48f3924a3354ab5a6ac9cadc20bd28be0e9d6a97 100644 (file)
@@ -40,9 +40,9 @@
                      |reference|refentry
                      |sect1|sect2|sect3|sect4|sect5
                      |section
-                     |book/glossary|article/glossary
-                     |book/bibliography|article/bibliography
-                     |book/index|article/index
+                     |book/glossary|article/glossary|part/glossary
+                     |book/bibliography|article/bibliography|part/bibliography
+                     |book/index|article/index|part/index
                      |colophon"
               mode="enumerate-files">
   <xsl:variable name="ischunk"><xsl:call-template name="chunk"/></xsl:variable>