Draft Emma aggregation - not exposed in site yet.
This commit is contained in:
17
src/main/xsl/emma.xsl
Normal file
17
src/main/xsl/emma.xsl
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output method="xml" omit-xml-declaration="yes" encoding="UTF-8"
|
||||
indent="yes" />
|
||||
<xsl:param name="project" />
|
||||
<xsl:template match="/report/data/all">
|
||||
<xsl:element name="project">
|
||||
<xsl:attribute name="name"><xsl:value-of select="$project" />
|
||||
</xsl:attribute>
|
||||
<xsl:apply-templates select="coverage" />
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
<xsl:template match="coverage">
|
||||
<xsl:copy-of select="." />
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
81
src/main/xsl/emma2html.xsl
Normal file
81
src/main/xsl/emma2html.xsl
Normal file
@@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output method="xml" omit-xml-declaration="yes" encoding="UTF-8"
|
||||
indent="yes" />
|
||||
<xsl:param name="project" />
|
||||
<xsl:param name="version" />
|
||||
<xsl:template match="/summary">
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=UTF-8"
|
||||
http-equiv="Content-Type" />
|
||||
<title><xsl:value-of select="$project" /> Coverage Report</title>
|
||||
<style TYPE="text/css">
|
||||
@import url("../css/maven-base.css");
|
||||
|
||||
@import url("../css/maven-theme.css");
|
||||
|
||||
@import url("../css/site.css");
|
||||
</style>
|
||||
</head>
|
||||
<body class="composite">
|
||||
<div id="banner">
|
||||
<a href="http://www.springframework.org/"
|
||||
id="bannerLeft">
|
||||
<xsl:value-of select="$project" />
|
||||
</a>
|
||||
<span id="bannerRight">
|
||||
<img src="../images/shim.gif" alt="" />
|
||||
</span>
|
||||
<div class="clear">
|
||||
<hr />
|
||||
</div>
|
||||
</div>
|
||||
<h2>
|
||||
OVERALL COVERAGE SUMMARY for
|
||||
<xsl:value-of select="$project" />
|
||||
(
|
||||
<xsl:value-of select="$version" />
|
||||
)
|
||||
</h2>
|
||||
<table class="bodyTable">
|
||||
<tr class="a">
|
||||
<th>name</th>
|
||||
<th>class, %</th>
|
||||
<th>method, %</th>
|
||||
<th>block, %</th>
|
||||
<th>line, %</th>
|
||||
</tr>
|
||||
<xsl:apply-templates select="project" />
|
||||
</table>
|
||||
<p></p>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
<xsl:template match="project">
|
||||
<tr class="b">
|
||||
<td>
|
||||
<xsl:value-of select="@name" />
|
||||
</td>
|
||||
<td>
|
||||
<xsl:apply-templates
|
||||
select="coverage[@type='class, %']" />
|
||||
</td>
|
||||
<td>
|
||||
<xsl:apply-templates
|
||||
select="coverage[@type='method, %']" />
|
||||
</td>
|
||||
<td>
|
||||
<xsl:apply-templates
|
||||
select="coverage[@type='block, %']" />
|
||||
</td>
|
||||
<td>
|
||||
<xsl:apply-templates select="coverage[@type='line, %']" />
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:template>
|
||||
<xsl:template match="coverage">
|
||||
<xsl:value-of select="@value" />
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
Reference in New Issue
Block a user