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" />
8 <xsl:when test=
"count($buildresults) > 0">
10 <xsl:when test=
"$buildresults/failure">
11 <h2>Build Failed (
<a href=
"#failure">click to see error
</a>)
</h2>
14 <h2>Build Succeeded
</h2>
17 <xsl:apply-templates select=
"$buildresults" />
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>
26 <xsl:template match=
"buildresults">
28 <xsl:apply-templates />
31 <xsl:template match=
"target">
33 <xsl:value-of select=
"@name"/>:
35 <xsl:apply-templates />
38 <xsl:template match=
"task">
39 <xsl:apply-templates />
42 <xsl:template match=
"message">
44 <xsl:if test=
"@level='Error'">
45 <xsl:attribute name=
"class">error
</xsl:attribute>
47 <xsl:if test=
"@level='Warning'">
48 <xsl:attribute name=
"class">warning
</xsl:attribute>
50 <xsl:if test=
"../@name != ''">
51 [
<xsl:value-of select=
"../@name"/>]
53 <xsl:value-of select=
"text()" />
58 <xsl:template match=
"failure">
60 <xsl:apply-templates />
64 <xsl:template match=
"builderror">
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" />
70 <xsl:value-of select=
"stacktrace" />
75 <xsl:template match=
"internalerror">
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" />
81 <xsl:value-of select=
"stacktrace" />
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/>
92 <xsl:template match=
"duration" />