Fixing an issue with output parameters that are of type IntPtr
[castle.git] / Samples / MonoRail / MRCCnetDashboard / Dashboard.Web / xsl / msbuild.xsl
blob79610063fc64bd11c5f6d855a3aa0476a2d556ea
1 <?xml version="1.0"?>
2 <!DOCTYPE xsl:stylesheet [
3 <!ENTITY nbsp "&#160;">
4 ]>
5 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
6 <xsl:output method="html"/>
8 <xsl:template match="/">
9 <xsl:variable name="buildresults" select="//msbuild" />
10 <xsl:choose>
11 <xsl:when test="count($buildresults) > 0">
12 <xsl:apply-templates select="$buildresults" />
13 </xsl:when>
14 <xsl:otherwise>
15 <h2>Log does not contain any XML output from MSBuild.</h2>
16 <p>
17 Please make sure that MSBuild is executed using the XmlLogger
18 (use the argument: <b style="white-space:nowrap">/logger:Kobush.Build.Logging.XmlLogger,Kobush.Build.dll</b>).
19 </p>
20 </xsl:otherwise>
21 </xsl:choose>
22 </xsl:template>
24 <xsl:template match="msbuild">
25 <table class="section-table" cellpadding="2" cellspacing="0" border="0" width="98%">
26 <tr>
27 <td class="sectionheader">
28 Build started <xsl:value-of select="@startTime"/>
29 </td>
30 </tr>
31 <tr>
32 <td>
33 <xsl:apply-templates/>
34 </td>
35 </tr>
36 <tr>
37 <td class="sectionheader">
38 <xsl:choose>
39 <xsl:when test="@success = 'false'">
40 Build FAILED
41 </xsl:when>
42 <xsl:otherwise>
43 Build succeeded
44 </xsl:otherwise>
45 </xsl:choose>
46 </td>
47 </tr>
48 <tr>
49 <td>
50 <xsl:variable name="errors" select="//error" />
51 <xsl:variable name="warnings" select="//warning" />
52 <xsl:if test="count($errors)+count($warnings) > 0">
53 <xsl:apply-templates select="$errors"/>
54 <xsl:apply-templates select="$warnings"/>
55 <br/>
56 <div style="color:orangered">
57 <xsl:value-of select="count($errors)"/> Error(s)
58 </div>
59 <div style="color:gold">
60 <xsl:value-of select="count($warnings)"/> Warning(s)
61 </div>
62 <br/>
63 </xsl:if>
64 Time elapsed <xsl:value-of select="@elapsedTime"/>
65 </td>
66 </tr>
67 </table>
68 </xsl:template>
70 <xsl:template match="project">
71 <div style="color:dodgerblue;margin:4 0">
72 Project "<xsl:value-of select="@file"/>"
73 <xsl:choose></xsl:choose>
74 <xsl:choose>
75 <xsl:when test="@name">
76 (<xsl:value-of select="@name"/> target(s)):
77 </xsl:when>
78 <xsl:otherwise>
79 (default targets):
80 </xsl:otherwise>
81 </xsl:choose>
82 </div>
83 <xsl:apply-templates/>
84 <xsl:if test="@success = 'false'">
85 <div style="color:dodgerblue;margin:2 0">
86 Done building project "<xsl:call-template name="projectName">
87 <xsl:with-param name="string">
88 <xsl:value-of select="@file" />
89 </xsl:with-param>
90 </xsl:call-template>" -- FAILED.
91 </div>
92 </xsl:if>
93 </xsl:template>
95 <xsl:template name="projectName">
96 <xsl:param name="string" />
97 <xsl:choose>
98 <xsl:when test="contains($string, '\')">
99 <xsl:call-template name="projectName">
100 <xsl:with-param name="string">
101 <xsl:value-of select="substring-after($string, '\')" />
102 </xsl:with-param>
103 </xsl:call-template>
104 </xsl:when>
105 <xsl:otherwise>
106 <xsl:value-of select="$string" />
107 </xsl:otherwise>
108 </xsl:choose>
109 </xsl:template>
111 <xsl:template match="target">
112 <div style="color:dodgerblue;margin:2 0">
113 Target "<xsl:value-of select="@name"/>":
114 </div>
115 <xsl:if test="*">
116 <div style="margin-left:10px;padding-left:10;border-left: 1px solid silver">
117 <xsl:apply-templates />
118 </div>
119 </xsl:if>
120 <xsl:if test="@success = 'false' and count(*//target/@success[.='false']) = 0">
121 <div style="color:dodgerblue;margin:2 0">
122 Done building target "<xsl:value-of select="@name"/>" -- FAILED.
123 </div>
124 </xsl:if>
125 </xsl:template>
127 <xsl:template match="task">
128 <div style="color:dodgerblue;margin:2 0">
129 Task "<xsl:value-of select="@name"/>":
130 </div>
131 <xsl:if test="*">
132 <div style="margin-left:10px;padding-left:10;border-left: 1px solid silver">
133 <xsl:apply-templates />
134 </div>
135 </xsl:if>
136 <div style="color:dodgerblue;margin:2 0">
137 Done executing task "<xsl:value-of select="@name"/>"
138 <xsl:if test="@success = 'false'">-- FAILED</xsl:if>.
139 </div>
140 </xsl:template>
142 <xsl:template match="message">
144 <xsl:choose>
145 <xsl:when test="@level = 'low'">
146 <div style="color:silver">
147 <xsl:value-of select="text()"/>
148 </div>
149 </xsl:when>
150 <xsl:when test="@level = 'normal'">
151 <div style="color:darkgray">
152 <xsl:value-of select="text()"/>
153 </div>
154 </xsl:when>
155 <xsl:otherwise>
156 <div style="color:dimgray">
157 <xsl:value-of select="text()"/>
158 </div>
159 </xsl:otherwise>
160 </xsl:choose>
161 </xsl:template>
163 <xsl:template match="error">
164 <div style="color:orangered">
165 <xsl:if test="@file != ''" >
166 <xsl:value-of select="@file"/>&nbsp;(<xsl:value-of select="@line"/>,<xsl:value-of select="@column"/>):&nbsp;
167 </xsl:if>
168 error&nbsp;<xsl:value-of select="@code"/>:&nbsp;<xsl:value-of select="text()" />
169 </div>
170 </xsl:template>
172 <xsl:template match="warning">
173 <div style="color:gold">
174 <xsl:if test="@file != ''" >
175 <xsl:value-of select="@file"/>&nbsp;(<xsl:value-of select="@line"/>,<xsl:value-of select="@column"/>):&nbsp;
176 </xsl:if>
177 warning&nbsp;<xsl:value-of select="@code"/>:&nbsp;<xsl:value-of select="text()" />
178 </div>
179 </xsl:template>
180 </xsl:stylesheet>