From ebaf03a421081231f2ba7935dd92e798fe0f5aa3 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Thu, 14 Oct 2004 17:11:03 +0000 Subject: [PATCH] Bug #1046371 - chunk children of Part 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 | 35 ++++++++++++++++++----------------- xsl/html/chunk-common.xsl | 18 ++++++++++++------ xsl/html/manifest.xsl | 6 +++--- 3 files changed, 33 insertions(+), 26 deletions(-) diff --git a/xsl/html/chunk-code.xsl b/xsl/html/chunk-code.xsl index 6513c1c7a..17213fcd5 100644 --- a/xsl/html/chunk-code.xsl +++ b/xsl/html/chunk-code.xsl @@ -242,10 +242,10 @@ |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] @@ -327,10 +327,10 @@ |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] @@ -338,10 +338,10 @@ |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] @@ -388,10 +388,10 @@ |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] @@ -430,8 +430,8 @@ |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] @@ -442,7 +442,7 @@ |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] @@ -523,7 +523,7 @@ |article |reference|refentry |book/glossary|article/glossary|part/glossary - |book/bibliography|article/bibliography + |book/bibliography|article/bibliography|part/bibliography |colophon"> @@ -555,7 +555,8 @@ + |article/index + |part/index"> diff --git a/xsl/html/chunk-common.xsl b/xsl/html/chunk-common.xsl index 66d25e334..2d914b7ca 100644 --- a/xsl/html/chunk-common.xsl +++ b/xsl/html/chunk-common.xsl @@ -24,12 +24,12 @@ 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 @@ -118,13 +118,19 @@ 1 1 + or name($node/parent::*) = 'book' + or name($node/parent::*) = 'part' + )">1 1 + or name($node/parent::*) = 'book' + or name($node/parent::*) = 'part' + )">1 1 + or name($node/parent::*) = 'book' + or name($node/parent::*) = 'part' + )">1 1 1 1 diff --git a/xsl/html/manifest.xsl b/xsl/html/manifest.xsl index 0f10f6017..48f3924a3 100644 --- a/xsl/html/manifest.xsl +++ b/xsl/html/manifest.xsl @@ -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"> -- 2.40.0