]> granicus.if.org Git - docbook-dsssl/commitdiff
Pass through an id on primary, secondary, or tertiary to
authorBob Stayton <bobs@sagehill.net>
Sun, 15 Mar 2009 19:38:17 +0000 (19:38 +0000)
committerBob Stayton <bobs@sagehill.net>
Sun, 15 Mar 2009 19:38:17 +0000 (19:38 +0000)
the index entry, so that one could link to an index entry.
You can't link to the id on an indexterm because that is
used to place the main anchor in the text flow.

xsl/html/autoidx.xsl
xsl/html/xref.xsl

index c646d7743a03b36f69b6b9494d3f3c7d8e204082..ad9f817d633dcae4340e988d39d017792e9b7521 100644 (file)
   <xsl:variable name="key" select="&primary;"/>
   <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/>
   <dt>
+    <xsl:call-template name="anchor">
+      <xsl:with-param name="node" select="primary"/>
+    </xsl:call-template>
     <xsl:value-of select="primary"/>
     <xsl:choose>
       <xsl:when test="$index.links.to.section = 1">
   <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;)"/>
   <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/>
   <dt>
+    <xsl:call-template name="anchor">
+      <xsl:with-param name="node" select="secondary"/>
+    </xsl:call-template>
     <xsl:value-of select="secondary"/>
     <xsl:choose>
       <xsl:when test="$index.links.to.section = 1">
   <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/>
   <xsl:variable name="refs" select="key('tertiary', $key)[&scope;]"/>
   <dt>
+    <xsl:call-template name="anchor">
+      <xsl:with-param name="node" select="tertiary"/>
+    </xsl:call-template>
     <xsl:value-of select="tertiary"/>
     <xsl:choose>
       <xsl:when test="$index.links.to.section = 1">
index 0f23ac9c81680ea98caef9376ba5405a7f5ed857..84e1d5daea7b58776215d821e870efef19b6b43c 100644 (file)
   </xsl:apply-templates>
 </xsl:template>
 
+<xsl:template match="primary|secondary|tertiary" mode="xref-to">
+  <xsl:value-of select="."/>
+</xsl:template>
+
 <xsl:template match="indexterm" mode="xref-to">
   <xsl:value-of select="primary"/>
 </xsl:template>