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
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
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
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 ********************************************************************************-->
40 xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform"
41 xmlns=
"http://www.w3.org/TR/html4/strict.dtd" >
43 <xsl:output method=
"html"/>
45 <xsl:variable name=
"tasklist" select=
"/cruisecontrol/build//target/task"/>
46 <xsl:variable name=
"javac.tasklist" select=
"$tasklist[@name='Javac'] | $tasklist[@name='javac'] | $tasklist[@name='compilewithwalls']"/>
47 <xsl:variable name=
"ejbjar.tasklist" select=
"$tasklist[@name='EjbJar'] | $tasklist[@name='ejbjar']"/>
49 <xsl:template match=
"/">
51 <xsl:variable name=
"javac.error.messages" select=
"$javac.tasklist/message[@priority='error'][text() != '']"/>
52 <xsl:variable name=
"javac.warn.messages" select=
"$javac.tasklist/message[@priority='warn'][text() != '']"/>
53 <xsl:variable name=
"ejbjar.error.messages" select=
"$ejbjar.tasklist/message[@priority='error'][text() != '']"/>
54 <xsl:variable name=
"ejbjar.warn.messages" select=
"$ejbjar.tasklist/message[@priority='warn'][text() != '']"/>
55 <xsl:variable name=
"total.errorMessage.count" select=
"count($javac.warn.messages) + count($ejbjar.warn.messages) + count($javac.error.messages) + count($ejbjar.error.messages)"/>
57 <xsl:if test=
"$total.errorMessage.count > 0">
58 <table align=
"center" cellpadding=
"2" cellspacing=
"0" border=
"0" width=
"98%">
60 <!-- NOTE: total.errorMessage.count is actually the number of lines of error
61 messages. This accurately represents the number of errors ONLY if the Ant property
62 build.compiler.emacs is set to "true" -->
63 <td class=
"compile-sectionheader">
64  Errors/Warnings: (
<xsl:value-of select=
"$total.errorMessage.count"/>)
67 <xsl:if test=
"count($javac.error.messages) > 0">
70 <pre class=
"compile-error-data">
71 <xsl:apply-templates select=
"$javac.error.messages"/>
76 <xsl:if test=
"count($javac.warn.messages) > 0">
79 <pre class=
"compile-data">
80 <xsl:apply-templates select=
"$javac.warn.messages"/>
85 <xsl:if test=
"count($ejbjar.error.messages) > 0">
88 <pre class=
"compile-error-data">
89 <xsl:apply-templates select=
"$ejbjar.error.messages"/>
94 <xsl:if test=
"count($ejbjar.warn.messages) > 0">
97 <pre class=
"compile-warn-data">
98 <xsl:apply-templates select=
"$ejbjar.warn.messages"/>
108 <xsl:template match=
"message[@priority='error']">
109 <xsl:value-of select=
"text()"/>
110 <xsl:if test=
"count(./../message[@priority='error']) != position()">
115 <xsl:template match=
"message[@priority='warn']">
116 <xsl:value-of select=
"text()"/><br class=
"none"/>