1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
|
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output method="html"/>
<xsl:template match="log">
<html>
<head>
<title>
Log file
</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table>
<tr>
<td>
<table border="0" width="100%" align="left">
<tr>
<td>
<h2>Log file (<xsl:value-of select="record/logger"/>) - <xsl:value-of select="substring(record/date/text(), 1, 10)"/></h2>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table border="0" align="center">
<tr>
<th>
<h4>Level</h4>
</th>
<th width="5"><pre><xsl:text> </xsl:text></pre></th>
<th>
<h4>Date</h4>
</th>
<th width="5"><pre><xsl:text> </xsl:text></pre></th>
<th >
<h4>Class</h4>
</th>
<th width="3"><pre><xsl:text> </xsl:text></pre></th>
<th>
<h4>Method</h4>
</th>
<th width="5"><pre><xsl:text> </xsl:text></pre></th>
<th>
<h4>Message</h4>
</th>
</tr>
<xsl:for-each select="record">
<xsl:apply-templates select="."/>
</xsl:for-each>
</table>
</td>
</tr>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="record">
<tr VALIGN = "top" bgcolor="#d1d7dc">
<td class="cell" valign="center" align="center">
<img title="icone" alt="icone" src="images/icon.gif"/>
<br></br>
<font size="-1">
<xsl:value-of select="level"/>
</font>
</td>
<td width="5"><pre><xsl:text> </xsl:text></pre></td>
<td class="cell">
<font size="-1">
<!--<xsl:value-of select="date"/> -->
<xsl:if test="date/text()">
<xsl:value-of select="substring(date, 9, 2)"/>
<xsl:text>/</xsl:text>
<xsl:value-of select="substring(date, 6, 2)"/>
<xsl:text>/</xsl:text>
<xsl:value-of select="substring(date, 1, 4)"/>
</xsl:if>
<br></br>
<xsl:if test="date/text()">
<xsl:value-of select="substring(date, 12, 8)"/>
</xsl:if>
</font>
</td>
<td width="5"><pre><xsl:text> </xsl:text></pre></td>
<td class="cell">
<font size="-1">
<xsl:value-of select="class"/>
</font>
</td>
<td width="3"><pre><xsl:text> </xsl:text></pre></td>
<td class="cell" nowrap="true">
<font size="-1">
<xsl:value-of select="method"/><xsl:text>()</xsl:text>
</font>
</td>
<td width="5"><pre><xsl:text> </xsl:text></pre></td>
<td class="cell"><font size="-1">
<xsl:value-of select="message"/><br></br>
<xsl:value-of select="exception/message"/>
</font>
</td>
</tr>
</xsl:template>
</xsl:stylesheet> |
Partager