0

我想用“string[1]”替换“Test.png”...例如“Test.png”=>“Fail.png”...

如何在 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>

谢谢, Muthu Selvan SR

4

1 回答 1

1

使用属性值模板src="{string[1]}.png"

样式表中文字结果元素中的单个属性规范可以具有任意数量的属性值模板。每个都被视为一个<xsl:value-of>.

于 2013-09-22T23:44:33.170 回答