]> granicus.if.org Git - docbook-dsssl/commitdiff
An indexterm primary, secondary, or tertiary element with an id or xml:id
authorBob Stayton <bobs@sagehill.net>
Mon, 16 Mar 2009 02:45:55 +0000 (02:45 +0000)
committerBob Stayton <bobs@sagehill.net>
Mon, 16 Mar 2009 02:45:55 +0000 (02:45 +0000)
now outputs that ID, so that index entries can be cross referenced to.

xsl/fo/autoidx.xsl
xsl/fo/xref.xsl

index e89858ea88ed9c3c1dd7c9f78a1f618bc06d29ba..684f788c2be61504e91b4d4131461f392b29d85d 100644 (file)
     <xsl:if test="$axf.extensions != 0">
       <xsl:attribute name="axf:suppress-duplicate-page-number">true</xsl:attribute>
     </xsl:if>
+
+    <xsl:for-each select="$refs/primary">
+      <xsl:if test="@id or @xml:id">
+        <fo:inline id="{(@id|@xml:id)[1]}"/>
+      </xsl:if>
+    </xsl:for-each>
+
     <xsl:value-of select="primary"/>
 
     <xsl:choose>
     <xsl:if test="$axf.extensions != 0">
       <xsl:attribute name="axf:suppress-duplicate-page-number">true</xsl:attribute>
     </xsl:if>
+
+    <xsl:for-each select="$refs/secondary">
+      <xsl:if test="@id or @xml:id">
+        <fo:inline id="{(@id|@xml:id)[1]}"/>
+      </xsl:if>
+    </xsl:for-each>
+
     <xsl:value-of select="secondary"/>
 
     <xsl:choose>
     <xsl:if test="$axf.extensions != 0">
       <xsl:attribute name="axf:suppress-duplicate-page-number">true</xsl:attribute>
     </xsl:if>
+
+    <xsl:for-each select="$refs/tertiary">
+      <xsl:if test="@id or @xml:id">
+        <fo:inline id="{(@id|@xml:id)[1]}"/>
+      </xsl:if>
+    </xsl:for-each>
+
     <xsl:value-of select="tertiary"/>
 
     <xsl:choose>
index 5ad0540011fec46b744e63339b900c17b980cc0e..195a50478ad38391c1f002f9f1a58778b516dae7 100644 (file)
   <xsl:value-of select="primary"/>
 </xsl:template>
 
+<xsl:template match="primary|secondary|tertiary" mode="xref-to">
+  <xsl:value-of select="."/>
+</xsl:template>
+
 <!-- ==================================================================== -->
 
 <xsl:template match="link" name="link">