Hi
1. I don't get the question...
2. This could be OK, but it is difficult to see without the source data. The @Risk attribute could probably used as a integer, so:
<xsl:when test="@Risk >= 2">
3. Could be simpler. Can you use the value of @Risk to name a class, like:
<xsl:attibute name="class" select="color{@Risk}"/> and then define the class style somewhere else:
.color{background-color: none;}
.color1{background-color: red;}
.color2{background-color: yellow;}
or move the <xsl:choose> to the <xsl:attribute>, like:
<tr>
<td>
<xsl:attribute name="style">
<xsl:text>background-color: </xsl:text>
<xsl:choose>
<xsl:when test="@Risk >='2'">
<xsl:text>yellow;</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>none;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:value-of select="@State"/>
</td>
</tr>
- alternative I would specify a class instead of a style attribute....