<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="/">
<html>
<head>
<style type="text/css">
table {table-layout: fixed; width: 100%;}
td {width: 20%; word-wrap: break-word;}
</style>
</head>
<body>
<h2>RTCP STUB STATUS</h2>
<table border="1">
<tr bgcolor="#9acd32" >
<th>Stub Component</th>
<th>Stub Name</th>
<th>Stub Operation</th>
<th>Stub Version</th>
<th>Stub Status</th>
</tr>
<xsl:for-each select="//stub">
<tr>
<td><xsl:value-of select="@component" /></td>
<td><xsl:value-of select="@name" /></td>
<td><xsl:value-of select="@operation" /></td>
<td><xsl:value-of select="@version" /></td>
<td><xsl:for-each select="instances/instance">
<xsl:value-of select="@status"/>
<xsl:value-of select="' '"/>
</xsl:for-each>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Based on my above xsl, i just want to make sure that whenever the value for status column for my output tabular data is Running its displayed in green color, if its Stopping it gets displayed as red. How do i add that part to this above xsl. I tried several ways to do this but none worked. It seems xsl has its own way to display output text pertaining to color. Any help in this regard would be greatly appreciated.
Sample XML
<stubs>
<stub component="ChannelInquiry_Binding_HTTP_v2" name="getAllChannelAvailabilityStub" operation="getAllChannelAvailability" version="26.7">
<instances>
<instance status="STOPPING"/>
</instances>
</stub>
<stubs>
Thanks, Ashley