This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook-apps] Html chunked and separate table of contents



Le 9 avr. 2005, à 21:06, Mauritz Jeanson a écrit :


-----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.
Thanks you so much. It works perfectly now.

As it is the first time I use a customized xsl layer apart from a customized titlepage, I'd like to know if what I've done is correct.
1 - I've copied the chunk-common.xsl file into a chunk-common-patched.xsl file, removing all parts but the footer-navigation template, i.e.:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0">
(comment README)
(comment modified)
<xsl:template name="footer.navigation">
(part with correction)
</xsl:template>
</xsl:stylesheet>


2 - I've put in a db2html.xsl the following lines:
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version='1.0'
xmlns="http://www.w3.org/TR/xhtml1/transitional";
exclude-result-prefixes="#default">
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/ chunk.xsl"/>
<xsl:import href="chunk-common-patched.xsl"/>
<xsl:import href="titlepage-html.xsl"/>
(customized encoding, toc, html stylesheet)
<xsl:param name="chunk.tocs.and.lots" select="'1'"/>
</xsl:stylesheet>


Then I have another question related to this separated table of contents. I use table of contents in chapter and sections too. Previously, when the table of contents was integrated in the title page, I was able to define different css tags for this table of contents and the other ones.
Is there a way to distinguish it from other table of contents now that it is in another file? I've not found a way to do it at the time being but I may have missed something.


Michèle
<http://micmacfr.homeunix.org>

Attachment: PGP.sig
Description: =?ISO-8859-1?Q?Ceci_est_une_signature_=E9lectronique_PGP?=


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]