92 lines
2.2 KiB
XML
92 lines
2.2 KiB
XML
<?xml version='1.0'?>
|
|
<xsl:stylesheet
|
|
version="1.0"
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
|
<xsl:template match="testsuites">
|
|
<html>
|
|
<head>
|
|
<style type="text/css">
|
|
body {
|
|
color: #000000;
|
|
font-family: “Century Gothic”, CenturyGothic, AppleGothic, sans-serif;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<table cols="4" width="90%" align="center">
|
|
<tr>
|
|
<td width="25%"> </td>
|
|
<td width="25%"> </td>
|
|
<td width="25%"> </td>
|
|
<td width="25%"> </td>
|
|
</tr>
|
|
<xsl:apply-templates/>
|
|
</table>
|
|
</body>
|
|
</html>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="testsuite">
|
|
<tr>
|
|
<td colspan="4"><div align="center">
|
|
<h1><b>Component "<xsl:value-of select="@name"/>"</b></h1>
|
|
</div></td>
|
|
</tr>
|
|
<xsl:apply-templates/>
|
|
<tr>
|
|
<td width="25%" bgcolor="#ffcc66">
|
|
<b>Tests: <xsl:value-of select="@tests"/></b>
|
|
</td>
|
|
<td width="25%" bgcolor="#00ccff">
|
|
<b>Disabled: <xsl:value-of select="@disabled"/></b>
|
|
</td>
|
|
<td width="25%" bgcolor="#ffcc66">
|
|
<b>Failures: <xsl:value-of select="@failures"/></b>
|
|
</td>
|
|
<td width="25%" bgcolor="#00ccff">
|
|
<b>Errors: <xsl:value-of select="@errors"/></b>
|
|
</td>
|
|
</tr>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="testcase">
|
|
<tr bgcolor="#e0f0d0">
|
|
<td colspan="3">
|
|
<b>Test: </b> <xsl:value-of select="@name"/>
|
|
</td>
|
|
<xsl:choose>
|
|
<xsl:when test="child::*">
|
|
<td bgcolor="#ff5050">FAIL</td>
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<td bgcolor="#50ff50">PASS</td>
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</tr>
|
|
<xsl:apply-templates/>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="failure">
|
|
<tr><td colspan="4" bgcolor="#ff9090">
|
|
<table width="100%">
|
|
<tr>
|
|
<th width="15%">File Name</th>
|
|
<td width="50%" bgcolor="#e0eee0">
|
|
<xsl:value-of select="substring-before(.,':')"/>
|
|
</td>
|
|
<th width="20%">Line Number</th>
|
|
<td width="10%" bgcolor="#e0eee0">
|
|
<xsl:value-of select='substring-after(substring-before(.,"
"),":")'/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th width="15%">Message</th>
|
|
<td colspan="3" width="85%" bgcolor="#e0eee0">
|
|
<xsl:value-of select="@message"/>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td></tr>
|
|
</xsl:template>
|
|
</xsl:stylesheet>
|