]> granicus.if.org Git - docbook-dsssl/commitdiff
Fixed bug #1717196 footnoteref not finding the right chunk for the target.
authorBob Stayton <bobs@sagehill.net>
Sun, 27 May 2007 06:28:16 +0000 (06:28 +0000)
committerBob Stayton <bobs@sagehill.net>
Sun, 27 May 2007 06:28:16 +0000 (06:28 +0000)
xsl/html/footnote.xsl

index a8286805f6cc11056d962dc224e965cb0a98fe9c..267621bc1e885a29a204a20cf036c6806e650e21 100644 (file)
 <xsl:template match="footnoteref">
   <xsl:variable name="targets" select="key('id',@linkend)"/>
   <xsl:variable name="footnote" select="$targets[1]"/>
-  <xsl:variable name="href">
-    <xsl:text>#ftn.</xsl:text>
-    <xsl:call-template name="object.id">
+
+  <xsl:variable name="target.href">
+    <xsl:call-template name="href.target">
       <xsl:with-param name="object" select="$footnote"/>
     </xsl:call-template>
   </xsl:variable>
+
+  <xsl:variable name="href">
+    <xsl:value-of select="substring-before($target.href, '#')"/>
+    <xsl:text>#ftn.</xsl:text>
+    <xsl:value-of select="substring-after($target.href, '#')"/>
+  </xsl:variable>
+
   <sup>
     <xsl:text>[</xsl:text>
     <a href="{$href}">