This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] XSL/HTML: ToC for specified appendix
- From: "Bob Stayton" <bobs at sagehill dot net>
- To: "techtonik" <techtonik at tut dot by>, <docbook-apps at lists dot oasis-open dot org>
- Date: Wed, 10 Nov 2004 09:05:48 -0800
- Subject: Re: [docbook-apps] XSL/HTML: ToC for specified appendix
- References: <1379104224.20041110153401@tut.by>
Well, it sure would be nice if you could specify real XPath expressions in
generate.toc. Unfortunately, there is no facility that I know of in XSLT
1.0 to 'exec' an XPath expression in a variable. The 'paths' that are
supported in generate.toc are processed as strings with element names
separated by "/", nothing more. The element names are compared to the
current element's name and its ancestor names.
But you can get what you want with a small customization of the template
named 'component.toc' in html/autotoc.xsl. That template calls the make.toc
template to generate the toc for a component (an appendix is a docbook
component). Just make the call to 'make.toc' conditional on your id
attribute:
<xsl:if test="@id != 'donttoc'">
<xsl:call-template name="make.toc">
Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net
----- Original Message -----
From: "techtonik" <techtonik@tut.by>
To: <docbook-apps@lists.oasis-open.org>
Sent: Wednesday, November 10, 2004 5:34 AM
Subject: [docbook-apps] XSL/HTML: ToC for specified appendix
> ||*()*|| docbook-apps..
>
> Some appendixes have ToCs and some are not - where is this
> determined in chunked HTML? I need to omit ToC for one appendix
> with specified 'id' and can't find a place to do this.
> "generate.toc" value like "appendix[@id='donttoc'] nop" doesn't
> work.
>
> --
> .techtonik
>
>
>