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