Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - if test to colour [Thread Next] Re: if test to colourTo: NULL Date: 5/1/2007 3:34:00 PM aidy wrote:
> the one thing I am stuck on is if I have a test status of 'PASS' I
> would like to colour the cell limegreen and if a 'FAIL' red.
Then add a bgcolor attribute e.g. instead of
<td><xsl:value-of select="."/></td>
use
<td>
<xsl:attribute name="bgcolor">
<xsl:choose>
<xsl:when test=". = 'PASS'">limegreen</xsl:when>
<xsl:otherwise>red</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:value-of select="."/>
</td>
--
Martin Honnen
http://JavaScript.FAQTs.com/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
