<xsl:stylesheet
	version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 

<xsl:template match="/">
<html>
<head>
	<title> GTest - GTest Run Summary Report </title>
</head>

<body bgcolor="#e0e0f0">

<div align="center">
	<h3>
		<b> GTest - Google's C++ test framework. </b> <br/>
		<a href="https://github.com/google/googletest"> https://github.com/google/googletest </a>
	</h3>
</div>

<p/>
<div align="center">
	<h2> GTest Run Results </h2>
</div>

<table cols="4" width="90%" align="center">
	<xsl:for-each select="testsuites/testsuite">
		<tr bgcolor="#f0e0f0">
			<td colspan="4">
				Running Suite <xsl:value-of select="@name"/>
			</td>
		</tr>
		<xsl:for-each select="testcase">
			<tr bgcolor="#e0f0d0">
				<td width="25%"> </td>
				<td colspan="2">
					Running test <xsl:value-of select="@name"/>...
				</td>
				<xsl:choose>
					<xsl:when test="failure">
					  <td bgcolor="#ff5050" width="25%"> Failed </td>
					  <tr>
						<td colspan="4" bgcolor="#ff9090">
							<table width="100%">
								<td width="15%" > Message </td>
								<td width="85%" bgcolor="#e0eee0"><xsl:value-of select="failure/@message"/></td>
							</table>
						</td>
					   </tr>
					</xsl:when>
					<xsl:otherwise>
						<td bgcolor="#50ff50" width="25%"> Passed </td>
					</xsl:otherwise>
				</xsl:choose>
			</tr>
		</xsl:for-each>
	</xsl:for-each>
</table>

<p/>
<table width="90%" rows="5" align="center">
	<tr align="center" bgcolor="skyblue">
		<th colspan="6"> Cumulative Summary for Run </th>
	</tr>
	<tr>
		<th width="15%" bgcolor="#ffffc0" align="center"> Testsuite </th>
		<th width="17%" bgcolor="#ffffc0" align="center"> Total </th>
		<th width="17%" bgcolor="#ffffc0" align="center"> Run </th>
		<th width="17%" bgcolor="#ffffc0" align="center"> Succeeded </th>
		<th width="17%" bgcolor="#ffffc0" align="center"> Failed </th>
		<th width="17%" bgcolor="#ffffc0" align="center"> Inactive </th>
	</tr>
	<xsl:for-each select="testsuites/testsuite">
		<tr align="center" bgcolor="lightgreen">
			<td> <xsl:value-of select="@name" /> </td>
			<td> <xsl:value-of select="@tests" /> </td>
			<td> <xsl:value-of select="@tests" /> </td>
			<td> <xsl:value-of select="@succeeded" /> </td>
			<td> <xsl:value-of select="@failures" /> </td>
			<td> <xsl:value-of select="@disabled" /> </td>
		</tr>
	</xsl:for-each>
</table>
<table>
<p/>
<hr align="center" width="90%" color="maroon" />
<h5 align="center"> File Generated By GTest - <xsl:value-of select="testsuites/@timestamp" /> </h5>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

