diff options
Diffstat (limited to 'help3xsl/online_transform.xsl')
-rw-r--r-- | help3xsl/online_transform.xsl | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl index 83c6894511..14fc99c8eb 100644 --- a/help3xsl/online_transform.xsl +++ b/help3xsl/online_transform.xsl @@ -1132,6 +1132,22 @@ </xsl:otherwise> </xsl:choose> </xsl:variable> + <xsl:variable name="imagestyle"> + <xsl:choose> + <xsl:when test="starts-with(@src,'media/screenshots/')"> + <xsl:value-of select="'screenshot'"/> + </xsl:when> + <xsl:when test="starts-with(@src,'media/')"> + <xsl:value-of select="'genericimage'"/> + </xsl:when> + <xsl:when test="not(starts-with(@src,'media/'))"> + <xsl:value-of select="'iconimage'"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="'genericimage'"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> <xsl:variable name="alt"><xsl:value-of select="./alt"/></xsl:variable> <xsl:variable name="width"> <xsl:if test="string-length(@width)!=0"> @@ -1143,7 +1159,7 @@ <xsl:call-template name="convert2px"><xsl:with-param name="value" select="@height"/></xsl:call-template> </xsl:if> </xsl:variable> - <img src="{$src2}" alt="{$alt}" title="{$alt}" style="{concat('width:',$width,';height:',$height)}"/> + <img src="{$src2}" class="{$imagestyle}" alt="{$alt}" title="{$alt}" style="{concat('width:',$width,';height:',$height)}"/> </xsl:template> <!-- Insert an object --> |