You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by ca...@apache.org on 2005/10/04 02:30:26 UTC
svn commit: r293477 -
/maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle.xsl
Author: carlos
Date: Mon Oct 3 17:30:25 2005
New Revision: 293477
URL: http://svn.apache.org/viewcvs?rev=293477&view=rev
Log:
Split messages by severity
Modified:
maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle.xsl
Modified: maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle.xsl
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle.xsl?rev=293477&r1=293476&r2=293477&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle.xsl (original)
+++ maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle.xsl Mon Oct 3 17:30:25 2005
@@ -71,30 +71,45 @@
</table>
</section>
- <section name="Checkstyle Error Summary">
-
- <table>
- <tr>
- <th>Error</th>
- <th>Count</th>
- </tr>
- <xsl:for-each select="//error" >
- <xsl:variable name="tmp" >
- <xsl:value-of select="./@message" />
- </xsl:variable>
- <xsl:if test="generate-id(.) = generate-id(key('stvalkey',$tmp)[1])">
- <tr>
- <td><xsl:value-of select="$tmp" /></td>
- <td><xsl:value-of select="count(key('stvalkey',$tmp))" /></td>
- </tr>
- </xsl:if>
- </xsl:for-each>
- </table>
-
- </section>
+ <xsl:apply-templates select="." mode="count">
+ <xsl:with-param name="severity">error</xsl:with-param>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="." mode="count">
+ <xsl:with-param name="severity">warning</xsl:with-param>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="." mode="count">
+ <xsl:with-param name="severity">info</xsl:with-param>
+ </xsl:apply-templates>
</body>
</document>
+ </xsl:template>
+
+ <xsl:template match="/" mode="count">
+ <xsl:param name="severity"/>
+
+ <xsl:element name="section">
+ <xsl:attribute name="name">Checkstyle <xsl:value-of select="$severity"/> Summary</xsl:attribute>
+
+ <table>
+ <tr>
+ <th>Error</th>
+ <th>Count</th>
+ </tr>
+ <xsl:for-each select="//error[@severity=$severity]" >
+ <xsl:variable name="tmp" >
+ <xsl:value-of select="./@message" />
+ </xsl:variable>
+ <xsl:if test="generate-id(.) = generate-id(key('stvalkey',$tmp)[1])">
+ <tr>
+ <td><xsl:value-of select="$tmp" /></td>
+ <td><xsl:value-of select="count(key('stvalkey',$tmp))" /></td>
+ </tr>
+ </xsl:if>
+ </xsl:for-each>
+ </table>
+
+ </xsl:element>
</xsl:template>
<xsl:template match="text()" />
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org