Added XSLT file thx to Mats Henricson

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@1401 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Tom Copeland
2003-02-06 15:31:25 +00:00
parent 63b8e30b2f
commit 890edf3f53

39
pmd/xslt/pmd-report.xslt Normal file
View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="pmd">
<html>
<head>
<title>PMD report</title>
<style type="text/css">
body { margin-left: 2%; margin-right: 2% }
</style>
</head>
<body>
<H1>PMD report</H1>
<hr/>
<xsl:for-each select="file">
<xsl:sort data-type="number" order="descending" select="count(violation)"/>
<H3><xsl:value-of disable-output-escaping="yes" select="@name"/></H3>
<table border="1" cellpadding="7" cellspacing="1" width="100%">
<tr bgcolor="#87CEEB">
<th>Line</th>
<th align="left">Description</th>
</tr>
<xsl:apply-templates select="violation"/>
</table>
<br/><br/><br/>
</xsl:for-each>
</body>
</html>
</xsl:template>
<xsl:template match="violation">
<tr>
<th><xsl:value-of disable-output-escaping="yes" select="@line"/></th>
<th align="left"><xsl:value-of disable-output-escaping="yes" select="."/></th>
</tr>
</xsl:template>
</xsl:stylesheet>