使用end-with的XSLT复合条件

时间:2014-09-22 20:27:19

标签: xslt

我现在有一些代码说:

<xsl:choose>
    <xsl:when test="$Admin = 2">
        <img src="../Lists/Announcement/Attachments/1/Banner.jpg" style="height:189px; width:568px;" title="{@Title};" />
    </xsl:when>
    <xsl:otherwise>
        <img src="../Lists/Announcement/Attachments/{@ID}/Banner.jpg" style="height:189px; width:568px;" title="{@Title};" />
    </xsl:otherwise>
</xsl:choose>

我想复合条件,以便它也接受名为banner.png的附件,以及show banner.png。 如果我使用子字符串函数并给它一个负数,它会从字符串的末尾向后计数吗?

1 个答案:

答案 0 :(得分:1)

  

如果我使用子字符串函数并给它一个负数,它会从字符串的末尾向后计数吗?

没有。 (是什么让你觉得它会?你真的在寻找规格吗?你试过吗?猜测,并询问你的猜测是否正确,听起来并不是一种非常有效的方法。)