This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] Html chunked and separate table of contents
- From: "Bob Stayton" <bobs at sagehill dot net>
- To: "Mauritz Jeanson" <mj at johanneberg dot com>, "'Michèle Garoche'" <michele dot garoche at easyconnect dot fr>, <docbook-apps at lists dot oasis-open dot org>
- Date: Sat, 9 Apr 2005 19:04:29 -0700
- Subject: Re: [docbook-apps] Html chunked and separate table of contents
- References: <200504091906.j39J6ZGB109464@mailhost.bostream.com>
Thanks for the fix, Mauritz. I checked it into CVS.
Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net
----- Original Message -----
From: "Mauritz Jeanson" <mj@johanneberg.com>
To: "'Michèle Garoche'" <michele.garoche@easyconnect.fr>;
<docbook-apps@lists.oasis-open.org>
Sent: Saturday, April 09, 2005 12:06 PM
Subject: RE: [docbook-apps] Html chunked and separate table of contents
> -----Original Message-----
> From: Michèle Garoche
>
> I've a book made of several xml files processed with docbook 4.4,
> 1.68.1 xsl stylesheets, xsltproc and saxon 6.5.3, with some
> customization.
>
> When I produce a chunked html output and try to use the
> chunk.tocs.and.lots parameter with value 1, it indeed produces a
> separate toc, but the name of the produced file: bk01-toc.html is not
> the same as the name used as a link on the title page:
> index.html-toc.html.
>
> Is there a way to avoid this?
Yes, it is (it's a bug). The incorrect link target is produced by this code
in chunk-common.xsl (in the template named "footer.navigation"):
<xsl:attribute name="href">
<xsl:apply-templates select="/*[1]"
mode="recursive-chunk-filename"/>
<xsl:text>-toc</xsl:text>
<xsl:value-of select="$html.ext"/>
</xsl:attribute>
Modify the apply-templates part, like this:
<xsl:attribute name="href">
<xsl:apply-templates select="/*[1]"
mode="recursive-chunk-filename">
<xsl:with-param name="recursive" select="true()"/> <!--
xsl:with-param added -->
</xsl:apply-templates>
<xsl:text>-toc</xsl:text>
<xsl:value-of select="$html.ext"/>
</xsl:attribute>
and the link should work.
/MJ