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] Font familiy of some automatically generated index-entries

If you look in fo/autoidx.xsl, the stylesheet module that handles
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" <ziegler@mpi-sb.mpg.de>
To: "docbook-apps" <docbook-apps@lists.oasis-open.org>
Sent: Tuesday, February 03, 2004 7:38 AM
Subject: [docbook-apps] Font familiy of some automatically generated

> 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: ziegler@mpi-sb.mpg.de          Tel.: (+49) 0681 9325-127
> To unsubscribe from this list, send a post to
docbook-apps-unsubscribe@lists.oasis-open.org, or visit

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