1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
|
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
version="1.0"
xmlns:check="http://check.sourceforge.net/ns"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/TR/REC-html40">
<xsl:output method="html"/>
<xsl:template match="/">
<html>
<head>
<title>Test Suite Results</title>
</head>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="datetime">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="duration">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="check:suite">
<xsl:apply-templates select="check:title"/>
<center>
<table width="80%" border="1">
<thead>
<tr>
<td>Test Path</td>
<td>Test Function Location</td>
<td>C Identifier</td>
<td>Test Case</td>
<td>Result</td>
</tr>
</thead>
<tbody>
<xsl:apply-templates select="check:test"/>
</tbody>
</table>
</center>
</xsl:template>
<xsl:template match="check:testsuites">
<xsl:apply-templates select="check:suite"/>
<h3>Unit Test Statistics</h3>
<ul>
<li>date/time: <xsl:apply-templates select="check:datetime"/></li>
<li>duration: <xsl:apply-templates select="check:duration"/></li>
</ul>
<hr></hr>
</xsl:template>
<xsl:template match="check:title">
<h2>Test Suite: <xsl:apply-templates/></h2>
</xsl:template>
<xsl:template match="check:test[@result='success']">
<tr bgcolor="lime">
<xsl:apply-templates/>
</tr>
</xsl:template>
<xsl:template match="check:test[@result='failure']">
<tr bgcolor="red">
<xsl:apply-templates/>
</tr>
</xsl:template>
<xsl:template match="check:test[@result='error']">
<tr bgcolor="yellow">
<xsl:apply-templates/>
</tr>
</xsl:template>
<xsl:template match="check:path">
<td><xsl:apply-templates/></td>
</xsl:template>
<xsl:template match="check:fn">
<td><xsl:apply-templates/></td>
</xsl:template>
<xsl:template match="check:id">
<td><xsl:apply-templates/></td>
</xsl:template>
<xsl:template match="check:description">
<td><xsl:apply-templates/></td>
</xsl:template>
<xsl:template match="check:message">
<td><xsl:apply-templates/></td>
</xsl:template>
</xsl:stylesheet>
|