summaryrefslogtreecommitdiff
path: root/help3xsl
diff options
context:
space:
mode:
Diffstat (limited to 'help3xsl')
-rw-r--r--help3xsl/online_transform.xsl12
1 files changed, 11 insertions, 1 deletions
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index 70843b4c36..90b8a44a25 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -1089,7 +1089,17 @@
<img src="{$src2}" alt="{$alt}" title="{$alt}" height="{$height}" width="{$width}">
<xsl:if test="ancestor::tablecell">
<xsl:attribute name="class"><xsl:value-of select="'imageicon'"/></xsl:attribute>
- <xsl:attribute name="src"><xsl:value-of select="concat(substring-before($src2,'.png'),'.svg')"/></xsl:attribute>
+ <xsl:attribute name="src">
+ <!--Check if icon is already svg-->
+ <xsl:choose>
+ <xsl:when test="substring($src2,string-length($src2) - 3, 4)='.png'">
+ <xsl:value-of select="concat(substring-before($src2,'.png'),'.svg')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$src2"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
</xsl:if>
</img>
</xsl:template>