2004-03-15 21:51:14 +00:00
|
|
|
|
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
|
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
2004-03-18 14:58:16 +00:00
|
|
|
|
|
2006-03-01 13:24:47 +00:00
|
|
|
|
<xsl:output method='html' encoding="UTF-8"
|
|
|
|
|
doctype-public="-//W3C//DTD HTML 4.01//EN"
|
|
|
|
|
doctype-system="http://www.w3.org/TR/html4/strict.dtd" />
|
2004-03-18 14:58:16 +00:00
|
|
|
|
|
2004-03-15 21:51:14 +00:00
|
|
|
|
<xsl:template match="logfile">
|
|
|
|
|
<html>
|
|
|
|
|
<head>
|
2004-03-18 18:26:22 +00:00
|
|
|
|
<script type="text/javascript" src="treebits.js" />
|
2004-03-15 21:51:14 +00:00
|
|
|
|
<link rel="stylesheet" href="logfile.css" type="text/css" />
|
|
|
|
|
<title>Log File</title>
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
2004-03-18 14:58:16 +00:00
|
|
|
|
<ul class='toplevel'>
|
|
|
|
|
<xsl:for-each select='line|nest'>
|
|
|
|
|
<li>
|
|
|
|
|
<xsl:apply-templates select='.'/>
|
|
|
|
|
</li>
|
|
|
|
|
</xsl:for-each>
|
|
|
|
|
</ul>
|
2004-03-15 21:51:14 +00:00
|
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
</xsl:template>
|
|
|
|
|
|
2005-08-01 13:23:43 +00:00
|
|
|
|
|
2004-03-15 21:51:14 +00:00
|
|
|
|
<xsl:template match="nest">
|
2004-03-18 21:04:14 +00:00
|
|
|
|
|
|
|
|
|
<!-- The tree should be collapsed by default if all children are
|
|
|
|
|
unimportant or if the header is unimportant. -->
|
2005-08-01 13:23:43 +00:00
|
|
|
|
<!-- <xsl:variable name="collapsed"
|
|
|
|
|
select="count(.//line[not(@priority = 3)]) = 0 or ./head[@priority = 3]" /> -->
|
|
|
|
|
<xsl:variable name="collapsed" select="count(.//*[@error]) = 0"/>
|
2004-03-18 21:04:14 +00:00
|
|
|
|
|
|
|
|
|
<xsl:variable name="style"><xsl:if test="$collapsed">display: none;</xsl:if></xsl:variable>
|
|
|
|
|
<xsl:variable name="arg"><xsl:choose><xsl:when test="$collapsed">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:variable>
|
|
|
|
|
|
|
|
|
|
<script type='text/javascript'>showTreeToggle(<xsl:value-of select="$collapsed"/>)</script>
|
2004-03-18 14:58:16 +00:00
|
|
|
|
<xsl:apply-templates select='head'/>
|
2004-03-18 21:04:14 +00:00
|
|
|
|
|
2006-03-01 13:24:47 +00:00
|
|
|
|
<!-- Be careful to only generate <ul>s if there are <li>s, otherwise it’s malformed. -->
|
|
|
|
|
<xsl:if test="line|nest">
|
|
|
|
|
|
|
|
|
|
<ul class='nesting' style="{$style}">
|
|
|
|
|
<xsl:for-each select='line|nest'>
|
|
|
|
|
|
|
|
|
|
<!-- Is this the last line? If so, mark it as such so that it
|
|
|
|
|
can be rendered differently. -->
|
|
|
|
|
<xsl:variable name="class"><xsl:choose><xsl:when test="position() != last()">line</xsl:when><xsl:otherwise>lastline</xsl:otherwise></xsl:choose></xsl:variable>
|
2004-03-18 21:04:14 +00:00
|
|
|
|
|
2006-03-01 13:24:47 +00:00
|
|
|
|
<li class='{$class}'>
|
|
|
|
|
<span class='lineconn' />
|
|
|
|
|
<span class='linebody'>
|
|
|
|
|
<xsl:apply-templates select='.'/>
|
|
|
|
|
</span>
|
|
|
|
|
</li>
|
|
|
|
|
</xsl:for-each>
|
|
|
|
|
</ul>
|
|
|
|
|
</xsl:if>
|
|
|
|
|
|
2004-03-15 21:51:14 +00:00
|
|
|
|
</xsl:template>
|
2005-08-01 13:23:43 +00:00
|
|
|
|
|
2004-03-15 21:51:14 +00:00
|
|
|
|
|
2004-03-16 12:47:09 +00:00
|
|
|
|
<xsl:template match="head|line">
|
|
|
|
|
<code>
|
2005-08-01 13:23:43 +00:00
|
|
|
|
<xsl:if test="@error">
|
|
|
|
|
<xsl:attribute name="class">error</xsl:attribute>
|
|
|
|
|
</xsl:if>
|
2004-03-16 12:47:09 +00:00
|
|
|
|
<xsl:apply-templates/>
|
2004-03-15 21:51:14 +00:00
|
|
|
|
</code>
|
|
|
|
|
</xsl:template>
|
2004-03-16 12:47:09 +00:00
|
|
|
|
|
2005-08-01 13:23:43 +00:00
|
|
|
|
|
2004-03-16 12:47:09 +00:00
|
|
|
|
<xsl:template match="storeref">
|
|
|
|
|
<em class='storeref'>
|
2004-03-17 16:52:48 +00:00
|
|
|
|
<span class='popup'><xsl:apply-templates/></span>
|
|
|
|
|
<span class='elided'>/...</span><xsl:apply-templates select='name'/><xsl:apply-templates select='path'/>
|
2004-03-16 12:47:09 +00:00
|
|
|
|
</em>
|
|
|
|
|
</xsl:template>
|
2004-03-15 21:51:14 +00:00
|
|
|
|
|
|
|
|
|
</xsl:stylesheet>
|