]> granicus.if.org Git - docbook-dsssl/commitdiff
Fix bug in footnote link introduced in 1.77.1.
authorBob Stayton <bobs@sagehill.net>
Tue, 17 Jul 2012 03:23:51 +0000 (03:23 +0000)
committerBob Stayton <bobs@sagehill.net>
Tue, 17 Jul 2012 03:23:51 +0000 (03:23 +0000)
xsl/html/footnote.xsl

index b385c9aa62ff70d1c5da411e83aae865e62307eb..8438265eaedf47ce31bc527f1f641c0334f926c3 100644 (file)
@@ -19,23 +19,29 @@ The footnote text is handled in name="process.footnote".
 The footnote marker gets an id of @id, while the
 footnote text gets an id of #ftn.@id. They cross link to each other. -->
 <xsl:template match="footnote">
-  <xsl:variable name="href">
-    <xsl:text>#ftn.</xsl:text>
+  <xsl:variable name="name">
     <xsl:call-template name="object.id">
       <xsl:with-param name="conditional" select="0"/>
     </xsl:call-template>
   </xsl:variable>
+  <xsl:variable name="href">
+    <xsl:text>#ftn.</xsl:text>
+    <xsl:value-of select="$name"/>
+  </xsl:variable>
 
   <a href="{$href}">
     <xsl:apply-templates select="." mode="class.attribute"/>
+    <xsl:if test="$generate.id.attributes = 0">
+      <xsl:attribute name="name">
+        <xsl:value-of select="$name"/>
+      </xsl:attribute>
+    </xsl:if>
+    
     <sup>
       <xsl:apply-templates select="." mode="class.attribute"/>
       <xsl:call-template name="id.attribute">
         <xsl:with-param name="conditional" select="0"/>
       </xsl:call-template>
-      <xsl:call-template name="anchor">
-        <xsl:with-param name="conditional" select="0"/>
-      </xsl:call-template>
       <xsl:text>[</xsl:text>
       <xsl:apply-templates select="." mode="footnote.number"/>
       <xsl:text>]</xsl:text>