Fixing an issue with output parameters that are of type IntPtr
[castle.git] / Samples / MonoRail / MRCCnetDashboard / Dashboard.Web / xsl / NAntTiming.xsl
blobbdd8f443a03db8e40a743c176d1c92cb78846cad
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 <script type="text/javascript">
7 function toggleDiv(imgId, divId)
9 eDiv = document.getElementById(divId);
10 eImg = document.getElementById(imgId);
12 if ( eDiv.style.display == "none" )
14 eDiv.style.display="block";
15 eImg.src="images/arrow_minus_small.gif";
17 else
19 eDiv.style.display = "none";
20 eImg.src="images/arrow_plus_small.gif";
23 </script>
24 <div id="NAntTimingReport">
25 <h1>NAnt Build Timing Report</h1>
27 <xsl:variable name="buildresults" select="//build/buildresults" />
28 <xsl:choose>
29 <xsl:when test="count($buildresults) > 0">
30 <xsl:apply-templates select="$buildresults" />
31 </xsl:when>
32 <xsl:otherwise>
33 <h2>Log does not contain any Xml output from NAnt.</h2>
34 <p>Please make sure that NAnt is executed using the XmlLogger (use the argument: <b>-logger:NAnt.Core.XmlLogger</b>). </p>
35 </xsl:otherwise>
36 </xsl:choose>
37 </div>
38 </xsl:template>
40 <xsl:template match="buildresults">
41 <div id="Summary">
42 <h3>Summary</h3>
43 <table>
44 <tbody>
45 <tr>
46 <td>Total Build Time:</td>
47 <td><xsl:value-of select="../@buildtime"/></td>
48 </tr>
49 </tbody>
50 </table>
51 </div>
53 <div id="Details">
54 <h3>Details</h3>
55 <table width="70%">
56 <thead>
57 <tr>
58 <th align="left">Target</th>
59 <th align="right">Duration (in seconds)</th>
60 </tr>
61 </thead>
62 <tbody>
63 <xsl:apply-templates select="//target">
64 <xsl:sort select="duration" order="descending" data-type="number" />
65 </xsl:apply-templates>
66 </tbody>
67 </table>
68 </div>
69 </xsl:template>
71 <xsl:template match="target">
72 <tr>
73 <td valign="top">
74 <xsl:variable name="divId">
75 <xsl:value-of select="generate-id()" />
76 </xsl:variable>
77 <img src="images/arrow_plus_small.gif" alt="Toggle to see tasks in this target">
78 <xsl:attribute name="id">
79 <xsl:text>img-</xsl:text>
80 <xsl:value-of select="$divId" />
81 </xsl:attribute>
82 <xsl:attribute name="onclick">toggleDiv('img-<xsl:value-of select="$divId" />','<xsl:value-of select="$divId" />')</xsl:attribute>
83 </img>&#0160;
84 <xsl:value-of select="@name" />
85 <div>
86 <xsl:attribute name="id">
87 <xsl:value-of select="$divId" />
88 </xsl:attribute>
89 <xsl:attribute name="style">
90 <xsl:text>display:none;</xsl:text>
91 </xsl:attribute>
92 <ul>
93 <xsl:apply-templates select="task">
94 <xsl:sort select="duration" order="descending" data-type="number" />
95 </xsl:apply-templates>
96 </ul>
97 </div>
98 </td>
99 <td valign="top" align="right"><xsl:value-of select="format-number(duration div 1000,'##0.00')" /></td>
100 </tr>
101 </xsl:template>
103 <xsl:template match="task">
104 <xsl:variable name="duration" select="format-number(duration div 1000,'##0.00')" />
105 <li><xsl:value-of select="@name" /> - <xsl:value-of select="$duration" /> seconds</li>
106 </xsl:template>
107 </xsl:stylesheet>