</xsl:choose>
</xsl:variable>
+ <xsl:variable name="filename.with.img.src.path">
+ <xsl:choose>
+ <xsl:when test="$img.src.path != '' and
+ $tag = 'img' and
+ not(starts-with($filename, '/')) and
+ not(contains($filename, '://'))">
+ <xsl:value-of select="concat($img.src.path, $filename)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$filename"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
<xsl:variable name="intrinsicwidth">
<!-- This funny compound test works around a bug in XSLTC -->
<xsl:choose>
<xsl:when test="$use.extensions != 0 and $graphicsize.extension != 0">
<xsl:choose>
<xsl:when test="function-available('simg:getWidth')">
- <xsl:value-of select="simg:getWidth(simg:new($filename),
+ <xsl:value-of select="simg:getWidth(simg:new($filename.with.img.src.path),
$nominal.image.width)"/>
</xsl:when>
<xsl:when test="function-available('ximg:getWidth')">
- <xsl:value-of select="ximg:getWidth(ximg:new($filename),
+ <xsl:value-of select="ximg:getWidth(ximg:new($filename.with.img.src.path),
$nominal.image.width)"/>
</xsl:when>
<xsl:otherwise>
<xsl:when test="$use.extensions != 0 and $graphicsize.extension != 0">
<xsl:choose>
<xsl:when test="function-available('simg:getDepth')">
- <xsl:value-of select="simg:getDepth(simg:new($filename),
+ <xsl:value-of select="simg:getDepth(simg:new($filename.with.img.src.path),
$nominal.image.depth)"/>
</xsl:when>
<xsl:when test="function-available('ximg:getDepth')">
- <xsl:value-of select="ximg:getDepth(ximg:new($filename),
+ <xsl:value-of select="ximg:getDepth(ximg:new($filename.with.img.src.path),
$nominal.image.depth)"/>
</xsl:when>
<xsl:otherwise>