This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Bob Stayton wrote:
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()"/>

Thank you, this works fine, but there is one problem left that sometimes occurs:


Imagine that in your document you first talk about stacks as a datastructure in general and later you talk about a (C++, Java,...) implementation "class stack". So you have two indexterms

<indexterm><primary>stack</primary></indexterm>
.
.
.
<indexterm><primary><classname>stack</classname></primary></indexterm>

There should be twe separate index entries, one for stack in general (proportional font), and one for the class stack (fixed font) so that the reader can quickly distinguish between them. Many books do it this way, e.g. Stroustrup (from which I've taken this stack example.)

But the XSLT stylesheets map both indexterms to one entry.

Is there any way to workaround this?


Greetings, 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 http://www.oasis-open.org/mlmanage/.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]