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 04:04:26 UTC
svn commit: r293489 -
/maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle-summary.xsl
Author: carlos
Date: Mon Oct 3 19:04:24 2005
New Revision: 293489
URL: http://svn.apache.org/viewcvs?rev=293489&view=rev
Log:
Create an intermediate summary xml file to ease summary report
Added:
maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle-summary.xsl (with props)
Added: maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle-summary.xsl
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle-summary.xsl?rev=293489&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle-summary.xsl (added)
+++ maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle-summary.xsl Mon Oct 3 19:04:24 2005
@@ -0,0 +1,49 @@
+<!--
+ * ========================================================================
+ *
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * ========================================================================
+-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:output method="xml" indent="yes"/>
+ <xsl:key name="errors-by-message" match="//error" use="@message"/>
+
+ <xsl:template match="/">
+ <errors>
+ <xsl:for-each select="//error">
+ <xsl:variable name="group-by">
+ <xsl:value-of select="./@message"/>
+ </xsl:variable>
+ <xsl:if test="generate-id(.) = generate-id(key('errors-by-message',$group-by)[1])">
+ <xsl:element name="error">
+ <xsl:attribute name="severity">
+ <xsl:value-of select="./@severity"/>
+ </xsl:attribute>
+ <xsl:attribute name="message">
+ <xsl:value-of select="$group-by"/>
+ </xsl:attribute>
+ <xsl:attribute name="count">
+ <xsl:value-of select="count(key('errors-by-message',$group-by))"/>
+ </xsl:attribute>
+ </xsl:element>
+ </xsl:if>
+ </xsl:for-each>
+ </errors>
+ </xsl:template>
+
+ <xsl:template match="text()"/>
+
+</xsl:stylesheet>
Propchange: maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle-summary.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle-summary.xsl
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org