1 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
\r
2 <xsl:output method="html" indent="yes"/>
\r
3 <xsl:decimal-format decimal-separator="." grouping-separator="," />
\r
5 <!-- Checkstyle XML Style Sheet by Stephane Bailliez <sbailliez@apache.org> -->
\r
6 <!-- Part of the Checkstyle distribution found at http://checkstyle.sourceforge.net -->
\r
7 <!-- Usage (generates checkstyle_report.html): -->
\r
8 <!-- <checkstyle failonviolation="false" config="${check.config}"> -->
\r
9 <!-- <fileset dir="${src.dir}" includes="**/*.java"/> -->
\r
10 <!-- <formatter type="xml" toFile="${doc.dir}/checkstyle_report.xml"/> -->
\r
11 <!-- </checkstyle> -->
\r
12 <!-- <style basedir="${doc.dir}" destdir="${doc.dir}" -->
\r
13 <!-- includes="checkstyle_report.xml" -->
\r
14 <!-- style="${doc.dir}/checkstyle-noframes.xsl"/> -->
\r
16 <xsl:template match="checkstyle">
\r
19 <style type="text/css">
\r
27 font:normal 80% arial,helvetica,sanserif;
\r
28 background-color:#FFFFFF;
\r
32 background: #efefef;
\r
39 vertical-align: top;
\r
50 table.log tr td, tr th {
\r
61 background: #525D76;
\r
63 text-decoration: none;
\r
73 <!-- jakarta logo -->
\r
74 <table border="0" cellpadding="0" cellspacing="0" width="100%">
\r
76 <td class="bannercell" rowspan="2">
\r
77 <!--a href="http://jakarta.apache.org/">
\r
78 <img src="http://jakarta.apache.org/images/jakarta-logo.gif" alt="http://jakarta.apache.org" align="left" border="0"/>
\r
81 <td class="text-align:right"><h2>CheckStyle Audit</h2></td>
\r
84 <td class="text-align:right">Designed for use with <a href='http://checkstyle.sourceforge.net/'>CheckStyle</a> and <a href='http://jakarta.apache.org'>Ant</a>.</td>
\r
89 <!-- Summary part -->
\r
90 <xsl:apply-templates select="." mode="summary"/>
\r
91 <hr size="1" width="100%" align="left"/>
\r
93 <!-- Package List part -->
\r
94 <xsl:apply-templates select="." mode="filelist"/>
\r
95 <hr size="1" width="100%" align="left"/>
\r
97 <!-- For each package create its part -->
\r
98 <xsl:for-each select="file">
\r
99 <xsl:sort select="@name"/>
\r
100 <xsl:apply-templates select="."/>
\r
104 <hr size="1" width="100%" align="left"/>
\r
113 <xsl:template match="checkstyle" mode="filelist">
\r
115 <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
\r
120 <xsl:for-each select="file">
\r
121 <xsl:sort select="@name"/>
\r
122 <xsl:variable name="errorCount" select="count(error)"/>
\r
124 <xsl:call-template name="alternated-row"/>
\r
125 <td><a href="#f-{@name}"><xsl:value-of select="@name"/></a></td>
\r
126 <td><xsl:value-of select="$errorCount"/></td>
\r
133 <xsl:template match="file">
\r
134 <a name="f-{@name}"></a>
\r
135 <h3>File <xsl:value-of select="@name"/></h3>
\r
137 <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
\r
139 <th>Error Description</th>
\r
142 <xsl:for-each select="error">
\r
144 <xsl:call-template name="alternated-row"/>
\r
145 <td><xsl:value-of select="@message"/></td>
\r
146 <td><xsl:value-of select="@line"/></td>
\r
150 <a href="#top">Back to top</a>
\r
154 <xsl:template match="checkstyle" mode="summary">
\r
156 <xsl:variable name="fileCount" select="count(file)"/>
\r
157 <xsl:variable name="errorCount" select="count(file/error)"/>
\r
158 <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
\r
164 <xsl:call-template name="alternated-row"/>
\r
165 <td><xsl:value-of select="$fileCount"/></td>
\r
166 <td><xsl:value-of select="$errorCount"/></td>
\r
171 <xsl:template name="alternated-row">
\r
172 <xsl:attribute name="class">
\r
173 <xsl:if test="position() mod 2 = 1">a</xsl:if>
\r
174 <xsl:if test="position() mod 2 = 0">b</xsl:if>
\r