GRAILS-1019: Allowing expressions to be used with the 'disabled' attribute for g...
[grails.git] / cruise / reporting-app / xsl / checkstyle.xsl
blobf0dac4b72c41d22e6b814c9be2c1417abd914b56
1 <?xml version="1.0"?>
2 <!--********************************************************************************
3 * CruiseControl, a Continuous Integration Toolkit
4 * Copyright (c) 2001, ThoughtWorks, Inc.
5 * 651 W Washington Ave. Suite 600
6 * Chicago, IL 60661 USA
7 * All rights reserved.
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
13 * + Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
16 * + Redistributions in binary form must reproduce the above
17 * copyright notice, this list of conditions and the following
18 * disclaimer in the documentation and/or other materials provided
19 * with the distribution.
21 * + Neither the name of ThoughtWorks, Inc., CruiseControl, nor the
22 * names of its contributors may be used to endorse or promote
23 * products derived from this software without specific prior
24 * written permission.
26 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
27 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
28 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
29 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
30 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 ********************************************************************************-->
38 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
39 <xsl:output method="html"/>
41 <xsl:template match="/">
42 <xsl:apply-templates select="cruisecontrol/checkstyle"/>
43 </xsl:template>
45 <xsl:template match="checkstyle[file/error]">
46 <xsl:variable name="file.error.count" select="count(file[error])" />
47 <xsl:variable name="total.error.count" select="count(file/error)" />
48 <table align="center" cellpadding="2" cellspacing="0" border="0" width="98%">
49 <tr>
50 <td class="checkstyle-sectionheader" colspan="3">
51 Checkstyle errors (<xsl:value-of select="$total.error.count" />)
52 </td>
53 </tr>
54 <xsl:for-each select="file/error" >
55 <tr>
56 <xsl:if test="position() mod 2 = 1">
57 <xsl:attribute name="class">checkstyle-oddrow</xsl:attribute>
58 </xsl:if>
59 <td class="checkstyle-data"><xsl:value-of select="../@name" /></td>
60 <td class="checkstyle-data"><xsl:value-of select="@line" /></td>
61 <td class="checkstyle-data"><xsl:value-of select="@message" /></td>
62 </tr>
63 </xsl:for-each>
64 </table>
65 </xsl:template>
67 <!-- <xsl:template match="*|@*|text()" />-->
68 </xsl:stylesheet>