source: release-kits/lirk3/resources/gs3-release-maker/ant/etc/log.xsl@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

File size: 6.1 KB
Line 
1<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
2<xsl:output method="html" indent="yes" encoding="US-ASCII"/>
3<!--
4 Copyright 2000-2004 The Apache Software Foundation
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17
18-->
19
20<!--
21
22 The purpose have this XSL is to provide a nice way to look at the output
23 from the Ant XmlLogger (ie: ant -listener org.apache.tools.ant.XmlLogger )
24
25 @author <a href="mailto:[email protected]">Stephane Bailliez</a>
26
27-->
28<xsl:decimal-format decimal-separator="." grouping-separator="," />
29
30<xsl:template match="/">
31<html>
32 <head>
33 <style type="text/css">
34 .bannercell {
35 border: 0px;
36 padding: 0px;
37 }
38 body {
39 margin: 0;
40 font:normal 100% arial,helvetica,sanserif;
41 background-color:#FFFFFF;
42 color:#000000;
43 }
44 table.status {
45 font:bold 80% arial,helvetica,sanserif;
46 background-color:#525D76;
47 color:#ffffff;
48 }
49 table.log tr td, tr th {
50 font-size: 80%;
51 }
52 .error {
53 color:red;
54 }
55 .warn {
56 color:brown;
57 }
58 .info {
59 color:gray;
60 }
61 .debug{
62 color:gray;
63 }
64 .failed {
65 font-size:80%;
66 background-color: red;
67 color:#FFFFFF;
68 font-weight: bold
69 }
70 .complete {
71 font-size:80%;
72 background-color: #525D76;
73 color:#FFFFFF;
74 font-weight: bold
75 }
76 .a td {
77 background: #efefef;
78 }
79 .b td {
80 background: #fff;
81 }
82 th, td {
83 text-align: left;
84 vertical-align: top;
85 }
86 th {
87 background: #ccc;
88 color: black;
89 }
90 table, th, td {
91 border: none
92 }
93 h3 {
94 font:bold 80% arial,helvetica,sanserif;
95 background: #525D76;
96 color: white;
97 text-decoration: none;
98 padding: 5px;
99 margin-right: 2px;
100 margin-left: 2px;
101 margin-bottom: 0;
102 }
103 </style>
104 </head>
105 <body>
106 <!-- jakarta logo -->
107 <table border="0" cellpadding="0" cellspacing="0" width="100%">
108 <tr>
109 <td valign="top" class="bannercell">
110 <a href="http://jakarta.apache.org/">
111 <img src="http://jakarta.apache.org/images/jakarta-logo.gif" alt="http://jakarta.apache.org" align="left" border="0"/>
112 </a>
113 </td>
114 <td style="text-align:right;vertical-align:bottom">
115 <a href="http://jakarta.apache.org/ant">Apache Ant</a>
116 </td>
117 </tr>
118 </table>
119
120 <table border="0" width="100%">
121 <tr><td><hr noshade="yes" size="1"/></td></tr>
122 </table>
123
124 <xsl:apply-templates select="build"/>
125
126 <!-- FOOTER -->
127 <table width="100%">
128 <tr><td><hr noshade="yes" size="1"/></td></tr>
129 <tr><td>
130 <div align="center"><font color="#525D76" size="-1"><em>
131 Copyright &#169; 2000-2002, Apache Software Foundation
132 </em></font></div>
133 </td></tr>
134 </table>
135 </body>
136</html>
137</xsl:template>
138
139<xsl:template match="build">
140 <!-- build status -->
141 <table width="100%">
142 <xsl:attribute name="class">
143 <xsl:if test="@error">failed</xsl:if>
144 <xsl:if test="not(@error)">complete</xsl:if>
145 </xsl:attribute>
146 <tr>
147 <xsl:if test="@error">
148 <td nowrap="yes">Build Failed</td>
149 </xsl:if>
150 <xsl:if test="not(@error)">
151 <td nowrap="yes">Build Complete</td>
152 </xsl:if>
153 <td style="text-align:right" nowrap="yes">Total Time: <xsl:value-of select="@time"/></td>
154 </tr>
155 <tr>
156 <td colspan="2">
157 <xsl:if test="@error">
158 <tt><xsl:value-of select="@error"/></tt><br/>
159 <i style="font-size:80%">See the <a href="#stacktrace" alt="Click for details">stacktrace</a>.</i>
160 </xsl:if>
161 </td>
162 </tr>
163 </table>
164 <table border="1" cellspacing="2" cellpadding="3" width="100%" style="font-size:80%">
165 <tr class="a"><td width="1">ant.file</td><td><xsl:value-of select="substring-after(//message[contains(text(),'ant.file')], '->')"/></td></tr>
166 <tr class="b"><td width="1">ant.version</td><td><xsl:value-of select="substring-after(//message[contains(text(),'ant.version')], '->')"/></td></tr>
167 <tr class="a"><td width="1">java.version</td><td><xsl:value-of select="substring-after(//message[contains(text(),'java.vm.version')], '->')"/></td></tr>
168 <tr class="b"><td width="1">os.name</td><td><xsl:value-of select="substring-after(//message[contains(text(),'os.name')], '->')"/></td></tr>
169 </table>
170 <!-- build information -->
171 <h3>Build events</h3>
172 <table class="log" border="1" cellspacing="2" cellpadding="3" width="100%">
173 <tr>
174 <th nowrap="yes" align="left" width="1%">target</th>
175 <th nowrap="yes" align="left" width="1%">task</th>
176 <th nowrap="yes" align="left">message</th>
177 </tr>
178 <xsl:apply-templates select=".//message[@priority != 'debug']"/>
179 </table>
180 <p>
181 <!-- stacktrace -->
182 <xsl:if test="stacktrace">
183 <a name="stacktrace"/>
184 <h3>Error details</h3>
185 <table width="100%">
186 <tr><td>
187 <pre><xsl:value-of select="stacktrace"/></pre>
188 </td></tr>
189 </table>
190 </xsl:if>
191 </p>
192</xsl:template>
193
194<!-- report every message but those with debug priority -->
195<xsl:template match="message[@priority!='debug']">
196 <tr valign="top">
197 <!-- alternated row style -->
198 <xsl:attribute name="class">
199 <xsl:if test="position() mod 2 = 1">a</xsl:if>
200 <xsl:if test="position() mod 2 = 0">b</xsl:if>
201 </xsl:attribute>
202 <td nowrap="yes" width="1%"><xsl:value-of select="../../@name"/></td>
203 <td nowrap="yes" style="text-align:right" width="1%">[ <xsl:value-of select="../@name"/> ]</td>
204 <td class="{@priority}" nowrap="yes">
205 <xsl:value-of select="text()"/>
206 </td>
207 </tr>
208</xsl:template>
209
210</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.