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: Applying emphasis to indexterms


I’m trying to ensure that any primary, secondary or tertiary entries in the indexterm element, and which have a nested emphasis element, are generated in the index with an italic font style. I’m using the basic indexing method with 1.76.1ns. I’ve tried to track the coding to customise, and from autoidx.xsl I thought that the template <xsl:template match="d:indexterm" mode="index-primary">  would be the most likely (I’m looking for an fo:block where the primary term is applied).

Here is my customisation from that template:

    <xsl:for-each select="$refs/d:primary">
       
<xsl:if test="@id or @xml:id">
         
<fo:inline id="{(@id|@xml:id)[1]}"/>
       
</xsl:if>
     
</xsl:for-each>
     
<!--modified 12/3/12:-->
     
<xsl:choose>
       
<xsl:when test="d:emphasis">
         
<fo:inline font-style="italic">
           
<xsl:value-of select="d:primary"/>     
         
</fo:inline>
       
</xsl:when>
       
<xsl:otherwise>
         
<xsl:value-of select="d:primary"/>
       
</xsl:otherwise>
     
</xsl:choose>

… and obviously not working (this template in my customisation -  and seemingly any from autoidx - gives me error messages about variables not declared – so it won’t transform). Where do I need to customise? Typical markup in a chunk (to format primary entries with <emphasis>) is:

<entry><indexterm>
               
<primary><emphasis>European carp</emphasis></primary>
               
<secondary>Cyprinus carpio</secondary>
             
</indexterm>

Where should I be looking so that <emphasis> is applied?

--
Dave Gardiner



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