Re: [docbook-apps] Font familiy of some automatically generated index-entries

From
"Cob Rtayton"
Date
2004-02-03T18:35:21+00:00
ID
00f701c3ea86$009c8200$2dfc9384@toshiro
Thread
Re: [docbook-apps] Font familiy of some automatically generated index-entries
If you look in fo/autoidx.xsl, the stylesheet module that handles
indexterms,
you will find this line:

<xsl:value-of select="primary"/>

Taking the value of an element returns just the text content of the element,
including those of its decendent elements.  I suspect this was done on
purpose to give the index a consistent look and to avoid complications
that might arise when elements are formatted. There are
elements that are allowed inside <primary> that would break the formatting
of an index.  For example, revhistory is allowed, but it generates a table.

If you want to change that behavior, you will need to customize several
templates in fo/autoidx.xsl. For example, replace the above line with:

<xsl:apply-templates select="primary/child::node()"/>

You have to do it this way because there is no template that matches
on <primary>.  You have to use child::node() instead of just *
so you process both text nodes and descendent element nodes.
You will need to do with for secondary and tertiary, and possibly
see and seealso entries.

It might make a nice feature request to have a parameter to select
which behavior you want.

Bob Stayton
Sagehill Enterprises


----- Original Message ----- 
From: "Joachim Ziegler" <>
To: "docbook-apps" <>
Sent: Tuesday, February 03, 2004 7:38 AM
Subject: [docbook-apps] Font familiy of some automatically generated
index-entries

> Hello list,
>
> I just wonder why when use an indexterm like
>
>
> <indexterm>
>    <primary>
>      <function>printf()</function>
>    </primary>
> </indexterm>
>
> the word "printf()" does not appear in fixed font in the index. It
> appears there in proportional font like the normal flow of text, neither
> in HTML, nor in PDF output (using XSLT-stylesheets 1.62.4)
>
> What can I do to have all my programming constructs like <function>s,
> <methodname>s, <class>es and so on rendered in fixed font in the index?
>
> Joachim
>
> -- 
> Joachim Ziegler                       Stuhlsatzenhausweg 85
> Max-Planck-Institut für Informatik    66123 Saarbrücken, Germany
> Email:           Tel.: (+49) 0681 9325-127
>
>
> To unsubscribe from this list, send a post to
, or visit
http://www.oasis-open.org/mlmanage/.
>
>
>