1 <?xml version=
"1.0" encoding=
"us-ascii" ?>
3 Excerpted from the book, "Pragmatic Project Automation"
5 Copyright 2004 The Pragmatic Programmers, LLC. All Rights Reserved.
6 Visit www.PragmaticProgrammer.com
11 xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform"
14 <xsl:output method=
"xml" indent=
"yes"/>
16 <xsl:template match=
"/">
21 <title>groovy Build Status
</title>
23 <link>http://build.canooo.com/groovy/
</link>
25 <description>CruiseControl build status feed for the groovy project.
</description>
29 <xsl:variable name=
"project.name"
30 select=
"cruisecontrol/info/property[@name='projectname']/@value"/>
31 <xsl:variable name=
"build.date"
32 select=
"cruisecontrol/info/property[@name='builddate']/@value"/>
33 <xsl:variable name=
"build.time"
34 select=
"cruisecontrol/build/@time"/>
35 <xsl:variable name=
"modification.list"
36 select=
"cruisecontrol/modifications/modification"/>
38 <xsl:variable name=
"testsuite.list" select=
"//testsuites/testsuite"/>
39 <xsl:variable name=
"testcase.list" select=
"$testsuite.list/testcase"/>
42 <xsl:when test=
"cruisecontrol/build/@error">BUILD FAILED
</xsl:when>
43 <xsl:otherwise>Build Succeeded
</xsl:otherwise>
46 <link>http://build.canoo.com/groovy/
</link>
49 <xsl:when test=
"cruisecontrol/build/@error">
50 <xsl:text><b
>Ant Error Message:
</b
><br/
></xsl:text>
51 <xsl:value-of select=
"cruisecontrol/build/@error"/>
54 <xsl:text><b
>Build:
</b
></xsl:text>
55 <xsl:value-of select=
"cruisecontrol/info/property[@name='label']/@value"/>
62 <b
>Date of build:
</b
>
63 <xsl:value-of select=
"$build.date"/><br/
>
65 <b
>Time to build:
</b
>
66 <xsl:value-of select=
"$build.time"/><br/
>
68 <xsl:apply-templates select=
"$modification.list">
69 <xsl:sort select=
"date" order=
"descending" data-type=
"text"/>
70 </xsl:apply-templates>
74 <b
>Unit Tests:
</b
>
75 <xsl:value-of select=
"count($testcase.list)"/>
83 <xsl:template match=
"modification">
84 <xsl:if test=
"position() = 1">
88 <b
>Last changed:
</b
>
89 <xsl:value-of select=
"date"/><br/
>
91 <b
>Last changed by:
</b
>
92 <xsl:value-of select=
"user"/><br/
>
94 <b
>Last log entry:
</b
>
95 <xsl:value-of select=
"comment"/><br/
>