Reputation: 21
I want replace "Test.png" with "string[1]" ...Example "Test.png" => "Fail.png" ...
How to do that in XSL ?
<xsl:when test="string[1] = 'Fail'">
<td> <a href="http://www.google.com/"><img src="Test.png" height="182" width="182"></img></a></td>
</xsl:when>
<xsl:otherwise>
<td> </td>
</xsl:otherwise>
</xsl:choose>
Thanks , Muthu Selvan SR
Upvotes: 0
Views: 489
Reputation: 4403
Use an attribute value template: src="{string[1]}.png"
A single attribute specification in a literal result element in the stylesheet can have any number of attribute value templates. Each is treated as an <xsl:value-of>
.
Upvotes: 1