OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: 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

<xsl:if test="@id != 'donttoc'">
  <xsl:call-template name="make.toc">

Bob Stayton
Sagehill Enterprises
DocBook Consulting

----- 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

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]