我有一个问题我需要在xsl choose子句中匹配两个参数,有没有办法实现这个?
例如:xsl:当test =我需要检查两个参数时,那么我可以检查相同的价格,但没有ordertype更低.
<xsl:choose>
<xsl:when test="price = 10" && "OrderType='P' ">
<td bgcolor="#ff00ff">
<xsl:value-of select="artist"/></td>
</xsl:when>
<xsl:when test="price = 10">
<td bgcolor="#cccccc">
<xsl:value-of select="artist"/></td>
</xsl:when>
<xsl:otherwise>
<td><xsl:value-of select="artist"/></td>
</xsl:otherwise>
</xsl:choose>
Run Code Online (Sandbox Code Playgroud)
<xsl:choose>
<xsl:when test="price = 10 and OrderType='P' ">
<td bgcolor="#ff00ff">
<xsl:value-of select="artist"/></td>
</xsl:when>
<xsl:when test="price = 10">
<td bgcolor="#cccccc">
<xsl:value-of select="artist"/></td>
</xsl:when>
<xsl:otherwise>
<td><xsl:value-of select="artist"/></td>
</xsl:otherwise>
</xsl:choose>
Run Code Online (Sandbox Code Playgroud)