Fix the build.
[castle.git] / Samples / MonoRail / MRCCnetDashboard / Dashboard.Web / xsl / compile.xsl
blobbca0cc5be8578fbb10922641ae8db20436740eb2
1 <?xml version="1.0"?>
2 <xsl:stylesheet
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
5 <xsl:output method="html"/>
7 <xsl:template match="/">
8 <xsl:variable name="messages" select="/cruisecontrol//buildresults//message" />
9 <xsl:if test="count($messages) > 0">
10 <xsl:variable name="error.messages" select="$messages[(contains(text(), 'error ')) or @level='Error'] | /cruisecontrol//builderror/message | /cruisecontrol//internalerror/message" />
11 <xsl:variable name="error.messages.count" select="count($error.messages)" />
12 <xsl:variable name="warning.messages" select="$messages[(contains(text(), 'warning ')) or @level='Warning']" />
13 <xsl:variable name="warning.messages.count" select="count($warning.messages)" />
14 <xsl:variable name="total" select="count($error.messages) + count($warning.messages)"/>
16 <xsl:if test="$error.messages.count > 0">
17 <table class="section-table" cellpadding="2" cellspacing="0" border="0" width="98%">
18 <tr>
19 <td class="sectionheader">
20 Errors: (<xsl:value-of select="$error.messages.count"/>)
21 </td>
22 </tr>
23 <tr>
24 <td>
25 <xsl:apply-templates select="$error.messages"/>
26 </td>
27 </tr>
28 </table>
29 </xsl:if>
30 <xsl:if test="$warning.messages.count > 0">
31 <table class="section-table" cellpadding="2" cellspacing="0" border="0" width="98%">
32 <tr>
33 <td class="sectionheader">
34 Warnings: (<xsl:value-of select="$warning.messages.count"/>)
35 </td>
36 </tr>
37 <tr><td><xsl:apply-templates select="$warning.messages"/></td></tr>
38 </table>
39 </xsl:if>
40 </xsl:if>
41 </xsl:template>
43 <xsl:template match="message">
44 <pre class="section-error"><xsl:value-of select="text()"/></pre>
45 </xsl:template>
47 </xsl:stylesheet>