log.xsl revision 5713
18861N/A<?xml version="1.0"?>
18861N/A<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
18861N/A<xsl:output method="html" indent="yes" encoding="US-ASCII"/>
18861N/A<!--
18861N/A Licensed to the Apache Software Foundation (ASF) under one or more
18861N/A contributor license agreements. See the NOTICE file distributed with
18861N/A this work for additional information regarding copyright ownership.
18861N/A The ASF licenses this file to You under the Apache License, Version 2.0
18861N/A (the "License"); you may not use this file except in compliance with
18861N/A the License. You may obtain a copy of the License at
18861N/A
18861N/A http://www.apache.org/licenses/LICENSE-2.0
18861N/A
18861N/A Unless required by applicable law or agreed to in writing, software
18861N/A distributed under the License is distributed on an "AS IS" BASIS,
18861N/A WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18861N/A See the License for the specific language governing permissions and
18861N/A limitations under the License.
18861N/A
18861N/A-->
18861N/A
18861N/A<!--
18861N/A
18861N/A The purpose have this XSL is to provide a nice way to look at the output
18861N/A from the Ant XmlLogger (ie: ant -listener org.apache.tools.ant.XmlLogger )
18861N/A
18861N/A @author <a href="mailto:sbailliez@apache.org">Stephane Bailliez</a>
18861N/A
18861N/A-->
18861N/A<xsl:decimal-format decimal-separator="." grouping-separator="," />
18861N/A
18861N/A<xsl:template match="/">
18861N/A<html>
18861N/A <head>
18861N/A <style type="text/css">
18861N/A .bannercell {
18861N/A border: 0px;
18861N/A padding: 0px;
18861N/A }
18861N/A body {
18861N/A margin: 0;
18861N/A font:normal 100% arial,helvetica,sanserif;
18861N/A background-color:#FFFFFF;
18861N/A color:#000000;
18861N/A }
18861N/A table.status {
18861N/A font:bold 80% arial,helvetica,sanserif;
18861N/A background-color:#525D76;
18861N/A color:#ffffff;
18861N/A }
18861N/A table.log tr td, tr th {
18861N/A font-size: 80%;
18861N/A }
18861N/A .error {
18861N/A color:red;
18861N/A }
18861N/A .warn {
18861N/A color:brown;
18861N/A }
18861N/A .info {
18861N/A color:gray;
18861N/A }
18861N/A .debug{
18861N/A color:gray;
18861N/A }
18861N/A .failed {
18861N/A font-size:80%;
18861N/A background-color: red;
18861N/A color:#FFFFFF;
18861N/A font-weight: bold
18861N/A }
18861N/A .complete {
18861N/A font-size:80%;
18861N/A background-color: #525D76;
18861N/A color:#FFFFFF;
18861N/A font-weight: bold
18861N/A }
18861N/A .a td {
18861N/A background: #efefef;
18861N/A }
18861N/A .b td {
18861N/A background: #fff;
18861N/A }
18861N/A th, td {
18861N/A text-align: left;
18861N/A vertical-align: top;
18861N/A }
18861N/A th {
18861N/A background: #ccc;
18861N/A color: black;
18861N/A }
18861N/A table, th, td {
18861N/A border: none
18861N/A }
18861N/A h3 {
18861N/A font:bold 80% arial,helvetica,sanserif;
18861N/A background: #525D76;
18861N/A color: white;
18861N/A text-decoration: none;
18861N/A padding: 5px;
18861N/A margin-right: 2px;
18861N/A margin-left: 2px;
18861N/A margin-bottom: 0;
18861N/A }
18861N/A </style>
18861N/A </head>
18861N/A <body>
18861N/A <!-- jakarta logo -->
18861N/A <table border="0" cellpadding="0" cellspacing="0" width="100%">
18861N/A <tr>
18861N/A <td valign="top" class="bannercell">
18861N/A <a href="http://jakarta.apache.org/">
18861N/A <img src="http://jakarta.apache.org/images/jakarta-logo.gif" alt="http://jakarta.apache.org" align="left" border="0"/>
18861N/A </a>
18861N/A </td>
18861N/A <td style="text-align:right;vertical-align:bottom">
18861N/A <a href="http://ant.apache.org/">Apache Ant</a>
18861N/A </td>
18861N/A </tr>
18861N/A </table>
18861N/A
18861N/A <table border="0" width="100%">
18861N/A <tr><td><hr noshade="yes" size="1"/></td></tr>
18861N/A </table>
18861N/A
18861N/A <xsl:apply-templates select="build"/>
18861N/A
18861N/A </body>
18861N/A</html>
18861N/A</xsl:template>
18861N/A
18861N/A<xsl:template match="build">
18861N/A <!-- build status -->
18861N/A <table width="100%">
18861N/A <xsl:attribute name="class">
18861N/A <xsl:if test="@error">failed</xsl:if>
18861N/A <xsl:if test="not(@error)">complete</xsl:if>
18861N/A </xsl:attribute>
18861N/A <tr>
18861N/A <xsl:if test="@error">
18861N/A <td nowrap="yes">Build Failed</td>
18861N/A </xsl:if>
18861N/A <xsl:if test="not(@error)">
18861N/A <td nowrap="yes">Build Complete</td>
18861N/A </xsl:if>
18861N/A <td style="text-align:right" nowrap="yes">Total Time: <xsl:value-of select="@time"/></td>
18861N/A </tr>
18861N/A <tr>
18861N/A <td colspan="2">
18861N/A <xsl:if test="@error">
18861N/A <tt><xsl:value-of select="@error"/></tt><br/>
18861N/A <i style="font-size:80%">See the <a href="#stacktrace" alt="Click for details">stacktrace</a>.</i>
18861N/A </xsl:if>
18861N/A </td>
18861N/A </tr>
18861N/A </table>
18861N/A <table border="1" cellspacing="2" cellpadding="3" width="100%" style="font-size:80%">
18861N/A <tr class="a"><td width="1">ant.file</td><td><xsl:value-of select="substring-after(//message[contains(text(),'ant.file')], '->')"/></td></tr>
18861N/A <tr class="b"><td width="1">ant.version</td><td><xsl:value-of select="substring-after(//message[contains(text(),'ant.version')], '->')"/></td></tr>
18861N/A <tr class="a"><td width="1">java.version</td><td><xsl:value-of select="substring-after(//message[contains(text(),'java.vm.version')], '->')"/></td></tr>
18861N/A <tr class="b"><td width="1">os.name</td><td><xsl:value-of select="substring-after(//message[contains(text(),'os.name')], '->')"/></td></tr>
18861N/A </table>
18861N/A <!-- build information -->
18861N/A <h3>Build events</h3>
18861N/A <table class="log" border="1" cellspacing="2" cellpadding="3" width="100%">
18861N/A <tr>
18861N/A <th nowrap="yes" align="left" width="1%">target</th>
18861N/A <th nowrap="yes" align="left" width="1%">task</th>
18861N/A <th nowrap="yes" align="left">message</th>
18861N/A </tr>
18861N/A <xsl:apply-templates select=".//message[@priority != 'debug']"/>
18861N/A </table>
18861N/A <p>
18861N/A <!-- stacktrace -->
18861N/A <xsl:if test="stacktrace">
18861N/A <a name="stacktrace"/>
18861N/A <h3>Error details</h3>
18861N/A <table width="100%">
18861N/A <tr><td>
18861N/A <pre><xsl:value-of select="stacktrace"/></pre>
18861N/A </td></tr>
18861N/A </table>
18861N/A </xsl:if>
18861N/A </p>
18861N/A</xsl:template>
18861N/A
18861N/A<!-- report every message but those with debug priority -->
18861N/A<xsl:template match="message[@priority!='debug']">
18861N/A <tr valign="top">
18861N/A <!-- alternated row style -->
18861N/A <xsl:attribute name="class">
18861N/A <xsl:if test="position() mod 2 = 1">a</xsl:if>
18861N/A <xsl:if test="position() mod 2 = 0">b</xsl:if>
18861N/A </xsl:attribute>
18861N/A <td nowrap="yes" width="1%"><xsl:value-of select="../../@name"/></td>
18861N/A <td nowrap="yes" style="text-align:right" width="1%">[ <xsl:value-of select="../@name"/> ]</td>
18861N/A <td class="{@priority}" nowrap="yes">
18861N/A <xsl:value-of select="text()"/>
18861N/A </td>
18861N/A </tr>
18861N/A</xsl:template>
18861N/A
18861N/A</xsl:stylesheet>
18861N/A