小编Ele*_*ena的帖子

带有 <xsl:if> 的 xsl 文字

我必须在 XSL 中编写一个简单的条件:

IF column=0 AND IF result = .35 
    set background color to green and write $result
ELSE IF result = 0.10 
    set background color to white and write the word "QQQ"
Run Code Online (Sandbox Code Playgroud)

我已经尝试过这个但它不起作用:

<xsl:param name="result"  />
    <xsl:param name="column" />    

    <xsl:if test="$result  = 0.35 and $column = 0">
        <xsl:attribute name='background-color'>#669933</xsl:attribute>
        <xsl:value-of select="result"/>      
    </xsl:if>

    <xsl:if test="$result = 0.10">
        <xsl:value-of select="QQQ"/>
    </xsl:if>
Run Code Online (Sandbox Code Playgroud)

有什么建议么?

xslt literals value-of

3
推荐指数
1
解决办法
2598
查看次数

标签 统计

literals ×1

value-of ×1

xslt ×1