This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: xsl and toc deepness
- From: Gabor Hojtsy <gabor at hojtsy dot hu>
- To: Norman Walsh <ndw at nwalsh dot com>
- Cc: docbook-apps at lists dot oasis-open dot org
- Date: Tue, 16 Jul 2002 16:16:54 +0200
- Subject: DOCBOOK-APPS: Re: xsl and toc deepness
- References: <029f01c21150$74f47970$7f37a3d5@home> <3D060EBC.29D1F8D3@kosek.cz><031801c21158$81770390$7f37a3d5@home> <87hejplz45.fsf@nwalsh.com>
> / Gabor Hojtsy <gabor@hojtsy.hu> was heard to say:
> | Both the major TOC, and all section TOCs (like the toc
> | for <part>s in the PHP manual are infinite deep - seems
> | like it's treated as a boolean switch
>
> Can you send a small(ish) sample that demonstrates the problem?
Yes, of course, just I needed some free time, as this is not a company
project you know ;)
So the XML file:
<?xml version='1.0' encoding='ISO-8859-1' ?>
<book>
<title>TOC test</title>
<part>
<title>First part</title>
<chapter>
<title>First chapter</title>
<para>Some text</para>
<sect1>
<title>Deep section</title>
<para>Section text</para>
</sect1>
</chapter>
</part>
</book>
The XSL file:
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:import href="file:///d:/phpcvs/phpdoc-tools/xsl/html/chunk.xsl"/>
<xsl:param name="toc.section.depth">1</xsl:param>
</xsl:stylesheet>
Applying this style sheet on the above XML file results in a toc with
I. First part
1. First chapter
Deep section
displayed in the main toc. This is not correct as I have parameterized
it above to display one TOC level, so it should only be
I. First part
and nothing more...
Hope this clears up what's my problem, and so we can
find a good way to solve it.
Goba