Next in thread → Next in month →

Re: [docbook-apps] XSL/HTML: ToC for specified appendix

From
Bob Stayton <>
Date
2004-11-10T17:05:52+00:00
ID
109201c4c747$8717dcf0$6501a8c0@toshiro
Thread
Re: [docbook-apps] XSL/HTML: ToC for specified appendix
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



----- Original Message ----- 
From: "techtonik" <>
To: <>
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
>
>
>
Next in thread → Next in month →