I changed the generate.toc string to "appendix toc article/appendix nop
article toc,title book toc,title chapter toc part toc preface toc
qandadiv toc qandaset toc reference toc section toc set toc". That
should make a ToC appear at the beginning of a Part, but without the
title "Table of Contents." However, the title continues to appear.
I've tested that it is because this template in division.xsl does not
pass the toc.title.p parameter (see <!--comment--> below):
===
<xsl:template match="part">
<xsl:call-template name="id.warning"/>
<div>
<xsl:apply-templates select="." mode="common.html.attributes"/>
<xsl:call-template name="id.attribute">
<xsl:with-param name="conditional" select="0"/>
</xsl:call-template>
<xsl:call-template name="part.titlepage"/>
<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="not(partintro) and contains($toc.params, 'toc')">
<xsl:call-template name="division.toc">
**<!-- missing here:
<xsl:with-param name="toc.title.p"
select="contains($toc.params, 'title')"/>
-->
</xsl:call-template>
</xsl:if>
<xsl:apply-templates/>
</div>
</xsl:template>
===
If you look at the corresponding templates for "book," "set" , "chapter"
(in component.xsl) etc., that line is always there, and toc.title.p is
always passed. The same issue exists in the same templates for other
outputs.
I think this is a bug for the XSLT. So:
- Should I raise a bug? If so, and before the bug is addressed...
- I tried to patch this by repeating that template in my own
customization layer and adding the missing line; but for my chunked
build, something strange happened: the Part's title page becomes missing
from the output (in fact it is merged into the books' title page), so
that the link in the book TOC to the Part became a dead link. What is
the proper way to patch this in a customization layer?
Thanks!
Regards,
Daniel
--
Daniel So
MySQL Documentation Team
Oracle Canada ULC / Markham, ON
MySQL:www.mysql.com
Oracle:www.oracle.com