[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: DOCBOOK-APPS: Re: xsl and toc deepness
On Tue, Jul 16, 2002 at 04:16:54PM +0200, Gabor Hojtsy wrote: > > / 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. I can at least clarify the meaning of the 'toc.section.depth' parameter. The 'section' means section or sect*, not any level in a toc. Setting it to '1' means you want to include sect1 elements, which is what is happening. I don't think you can do what you want with just stylesheet parameters. You'll probably need to customize some templates in autotoc.xsl in your customization layer so as to not apply-templates to child elements. -- Bob Stayton 400 Encinal Street Publications Architect Santa Cruz, CA 95060 Technical Publications voice: (831) 427-7796 Caldera International, Inc. fax: (831) 429-1887 email: bobs@caldera.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC