← Prev in month ← Prev in thread

Applying emphasis to indexterms

From
Xmplar <>
Date
2012-03-12T10:02:58+00:00
ID
Thread
Applying emphasis to indexterms
X-NONE
  X-NONE
  
   
   
   
   
   
   
   
   
   
   
   
  
  
   
   
   
   
   
   
   
   
   
   
   
  

    
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
← Prev in month ← Prev in thread