With some googling and tinkering, I figured out how to write a xslt
stylesheet for test reporting. Here is the stylesheet:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="
http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="testsuite">
<h2>Test Report:<xsl:value-of select="@name"/></h2>
<table border="0">
<tr>
<td><b>Number of Tests:</b></td>
<td><xsl:value-of select="@tests"/></td>
</tr>
<tr>
<td><b>Number of Failures:</b></td>
<td><xsl:value-of select="@failures"/></td>
</tr>
<tr>
<td><b>Execution Time:</b></td>
<td><xsl:value-of select="
@time"/></td>
</tr>
<tr>
<td><b>Number of Tests:</b></td>
<td><xsl:value-of select="@tests"/></td>
</tr>
</table>
<h3>Test Status</h3>
<table border="1">
<tr bgcolor="#9acd32">
<th align="left">Name</th>
<th align="left">Status</th>
<th align="left">Execution Time</th>
</tr>
<xsl:apply-templates select="testcase"/>
</table>
</xsl:template>
<xsl:template match="testcase">
<tr>
<td><xsl:value-of select="@name"/></td>
<xsl:variable name="bgcolor">
<xsl:choose>
<xsl:when test="@status='Failed'">red</xsl:when>
<xsl

therwise></xsl

therwise>
</xsl:choose>
</xsl:variable>
<td bgcolor="{$bgcolor}"><xsl:value-of select="@status"/></td>
<td><xsl:value-of select="
@time"/></td>
</tr>
<xsl:apply-templates select="failure"/>
</xsl:template>
<xsl:template match="failure">
<tr><td colspan="3"><xsl:value-of select="."/></td></tr>
</xsl:template>
</xsl:stylesheet>