[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Set toc: listing book titles only (fo)
A small customization will achieve what you want. The template named
'set.toc' in fo/autotoc.xsl creates a set TOC. It does an apply-templates
in mode="toc" on the set element's children. It also passes a parameter
named 'toc-context' whose value is the current set element. So you can make
a small customization to the template that matches 'book' in mode="toc"
using that context value.
Specifically, copy the template with match="book|setindex" mode="toc" from
fo/autotoc.xsl to your customization layer, and change this:
<xsl:if test="$toc.section.depth > 0
and $toc.max.depth > $depth.from.context
and $nodes">
to:
<xsl:if test="$toc.section.depth > 0
and not($toc-context/self::set)
and $toc.max.depth > $depth.from.context
and $nodes">
The additional test turns off processing of the book element's children when
the toc-context is 'set'. If the context is anything other than set, then
you will get the normal processing of book children.
Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net
----- Original Message -----
From: "Donna Robinson" <donna@terpsichore.ws>
To: <docbook-apps@lists.oasis-open.org>
Sent: Sunday, November 20, 2005 7:22 PM
Subject: [docbook-apps] Set toc: listing book titles only (fo)
> Hi,
>
> I've been trying (without success) to generate a set-level toc listing
> comprising only book-titles (rather than the whole shebang).
>
> I found this in the archives:
> http://lists.oasis-open.org/archives/docbook-apps/200404/msg00030.html
> but unfortunately it's not much help wrt fo output.
>
> Is this a relatively simple thing to do?
>
> Donna
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>
>
>
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]