ime"><xsl:value-of select="millis"/></xsl:variable>
	<xsl:variable name="nIndex"><xsl:value-of select="position()"/></xsl:variable>
	<xsl:variable name="prevTime"><xsl:value-of select="/log/record[$nIndex - 1]/millis"/></xsl:variable>
	
	<tr>
		<td><xsl:value-of select="sequence"/></td>
		<td><xsl:value-of select="millis - $START_TIME_MS"/></td>
		<td>
			<xsl:if test="$nIndex > 1">
				<xsl:value-of select="$myTime - $prevTime"/>
			</xsl:if>
		</td>
		<td><xsl:value-of select="level"/></td>
		<td><xsl:value-of select="method"/></td>
		<td><xsl:apply-templates select="message"/></td>
	</tr>
</xsl:template>

<!-- Replaces the newline character in the message string with <br/> for it to work in the HTML parser  -->
<xsl:template match="message">
    <xsl:call-template name="replace">
        <xsl:with-param name="string" select="."/>
    </xsl:call-template>
</xsl:template>

<xsl:template name="replace">
    <xsl:param name="string"/>
    <xsl:choose>
        <xsl:when test="contains($string,'&#10;')">
            <xsl:value-of select="substring-before($string,'&#10;')"/>
            <br />
            <xsl:call-template name="replace">
                <xsl:with-param name="string" select="substring-after($string,'&#10;')"/>
            </xsl:call-template>
        </xsl:when>
        <xsl:otherwise>
            <xsl:value-of select="$string"/>
        </xsl:otherwise>
    </xsl:choose>
</xsl:template>

</xsl:stylesheet>	