This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] XSL: No toc for qandaset
- From: Bob Stayton <bobs at sco dot com>
- To: Grant McLean <grant at mclean dot net dot nz>
- Cc: docbook-apps at lists dot oasis-open dot org
- Date: Sun, 3 Aug 2003 13:13:47 -0700
- Subject: Re: [docbook-apps] XSL: No toc for qandaset
- References: <3F2CDCB6.6040701@mclean.net.nz>
On Sun, Aug 03, 2003 at 09:58:14PM +1200, Grant McLean wrote:
> I'm having trouble getting the DocBook XSL stylesheets to generate
> a table of contents for my FAQ document. It all used to work, but
> I have rebuilt my machine since then and upgraded to the latest
> stylesheets.
>
> My driver file includes the following parameter definitions:
>
> <xsl:param name="generate.toc">
> qandaset toc
> qandadiv nop
> </xsl:param>
> <xsl:param name="generate.section.toc.level" select="3"></xsl:param>
>
> Which did previously give me the desired multi-level TOC at the
> start of the document and no TOC in each section. But now when
> I generate the HTML, I get nothing where the table of contents
> ought to be. It used to work with version 1.51 of the stylesheets.
>
> I have poked around in qandaset.xsl and found this section:
>
> <xsl:if test="contains($toc.params, 'toc') and $toc = '1'">
> <xsl:call-template name="process.qanda.toc"/>
> </xsl:if>
>
> If I remove the xsl:if and make it this:
>
> <p>$toc.params: '<xsl:value-of select="$toc.params"/>'</p>
> <p>$toc: '<xsl:value-of select="$toc"/>'</p>
> <xsl:call-template name="process.qanda.toc"/>
>
> then I do get an appropriately formatted TOC preceded by this:
>
> <p>$toc.params: 'toc'</p>
> <p>$toc: ''</p>
>
> I tried to trace back to determine why $toc was empty but quickly got out
> of my depth. Is it possible this is a bug in the stylesheets or am I
> doing something wrong?
>
> The full document and driver file are in CVS here:
>
> http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/perl-xml/perl-xml-faq/
Now the stylesheets look for a dbhtml processing instruction
as well to turn on each qandaset toc. That is what the
$toc variable is about.
See http://www.sagehill.net/docbookxsl/QandAtoc.html
--
Bob Stayton 400 Encinal Street
Publications Architect Santa Cruz, CA 95060
Technical Publications voice: (831) 427-7796
The SCO Group fax: (831) 429-1887
email: bobs@sco.com
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org