]> granicus.if.org Git - docbook-dsssl/commitdiff
Fix bug #2750253 wrong links in list of figures in chunk.html
authorBob Stayton <bobs@sagehill.net>
Mon, 4 May 2009 02:17:33 +0000 (02:17 +0000)
committerBob Stayton <bobs@sagehill.net>
Mon, 4 May 2009 02:17:33 +0000 (02:17 +0000)
when target html is in a subdirectory and dbhtml filename used.

xsl/html/chunk-common.xsl

index c606c18a8b1a20bcfc130b65af5a4bf6571c7e21..aa22094956359cc3c0c351ddff110ee6a3586a94 100644 (file)
     </xsl:call-template>
   </xsl:variable>
   <xsl:variable name="href.from.uri">
-    <xsl:call-template name="href.target.uri">
-      <xsl:with-param name="object" select="$context"/>
-    </xsl:call-template>
+    <xsl:choose>
+      <xsl:when test="not($toc-context = .)">
+        <xsl:call-template name="href.target.uri">
+          <xsl:with-param name="object" select="$toc-context"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="href.target.uri">
+          <xsl:with-param name="object" select="$context"/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
   </xsl:variable>
   <!-- * <xsl:message>toc-context: <xsl:value-of select="local-name($toc-context)"/></xsl:message> -->
   <!-- * <xsl:message>node: <xsl:value-of select="local-name(.)"/></xsl:message> -->