git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@293489 13f79535-47bb-0310-9956-ffa450edef68
50 lines
2.0 KiB
XML
50 lines
2.0 KiB
XML
<!--
|
|
* ========================================================================
|
|
*
|
|
* 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>
|