Fix the build.
[castle.git] / Samples / MonoRail / MRCCnetDashboard / Dashboard.Web / xsl / NAnt.xsl
bloba4e550e6c6ec43bf351697352c5bf3997a45406e
1 <?xml version="1.0"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3 <xsl:output method="html"/>
5 <xsl:template match="/">
6 <xsl:variable name="buildresults" select="/cruisecontrol/build/buildresults" />
7 <xsl:choose>
8 <xsl:when test="count($buildresults) > 0">
9 <xsl:choose>
10 <xsl:when test="$buildresults/failure">
11 <h2>Build Failed (<a href="#failure">click to see error</a>)</h2>
12 </xsl:when>
13 <xsl:otherwise>
14 <h2>Build Succeeded</h2>
15 </xsl:otherwise>
16 </xsl:choose>
17 <xsl:apply-templates select="$buildresults" />
18 </xsl:when>
19 <xsl:otherwise>
20 <h2>Log does not contain any Xml output from NAnt.</h2>
21 <p>Please make sure that NAnt is executed using the XmlLogger (use the argument: <b>-logger:NAnt.Core.XmlLogger</b>). </p>
22 </xsl:otherwise>
23 </xsl:choose>
24 </xsl:template>
26 <xsl:template match="buildresults">
27 <hr/>
28 <xsl:apply-templates />
29 </xsl:template>
31 <xsl:template match="target">
32 <p>
33 <xsl:value-of select="@name"/>:
34 </p>
35 <xsl:apply-templates />
36 </xsl:template>
38 <xsl:template match="task">
39 <xsl:apply-templates />
40 </xsl:template>
42 <xsl:template match="message">
43 <span>
44 <xsl:if test="@level='Error'">
45 <xsl:attribute name="class">error</xsl:attribute>
46 </xsl:if>
47 <xsl:if test="@level='Warning'">
48 <xsl:attribute name="class">warning</xsl:attribute>
49 </xsl:if>
50 <xsl:if test="../@name != ''">
51 [<xsl:value-of select="../@name"/>]
52 </xsl:if>
53 <xsl:value-of select="text()" />
54 </span>
55 <br />
56 </xsl:template>
58 <xsl:template match="failure">
59 <a name="failure">
60 <xsl:apply-templates />
61 </a>
62 </xsl:template>
64 <xsl:template match="builderror">
65 <br/>
66 <span class="error">Build Error: <xsl:value-of select="type"/><br/>
67 <xsl:value-of select="message"/><br/>
68 <xsl:apply-templates select="location" />
69 <pre>
70 <xsl:value-of select="stacktrace" />
71 </pre>
72 </span>
73 </xsl:template>
75 <xsl:template match="internalerror">
76 <br/>
77 <span class="error">Internal Error: <xsl:value-of select="type"/><br/>
78 <xsl:value-of select="message"/><br/>
79 <xsl:apply-templates select="location" />
80 <pre>
81 <xsl:value-of select="stacktrace" />
82 </pre>
83 </span>
84 </xsl:template>
86 <xsl:template match="location">
87 in <xsl:value-of select="filename"/>
88 line: <xsl:value-of select="linenumber"/>
89 col: <xsl:value-of select="columnnumber"/><br/>
90 </xsl:template>
92 <xsl:template match="duration" />
93 </xsl:stylesheet>