Skip to content
Snippets Groups Projects
Commit 458820df authored by Eelco Dolstra's avatar Eelco Dolstra
Browse files

* Generate valid HTML.

parent 6b8bb8d7
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method='html' /> <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" />
<xsl:template match="logfile"> <xsl:template match="logfile">
<html> <html>
...@@ -37,22 +39,27 @@ ...@@ -37,22 +39,27 @@
<script type='text/javascript'>showTreeToggle(<xsl:value-of select="$collapsed"/>)</script> <script type='text/javascript'>showTreeToggle(<xsl:value-of select="$collapsed"/>)</script>
<xsl:apply-templates select='head'/> <xsl:apply-templates select='head'/>
<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 <!-- Be careful to only generate <ul>s if there are <li>s, otherwise it’s malformed. -->
can be rendered differently. --> <xsl:if test="line|nest">
<xsl:variable name="class"><xsl:choose><xsl:when test="position() != last()">line</xsl:when><xsl:otherwise>lastline</xsl:otherwise></xsl:choose></xsl:variable>
<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>
<li class='{$class}'> <li class='{$class}'>
<span class='lineconn' /> <span class='lineconn' />
<span class='linebody'> <span class='linebody'>
<xsl:apply-templates select='.'/> <xsl:apply-templates select='.'/>
</span> </span>
</li> </li>
</xsl:for-each> </xsl:for-each>
</ul> </ul>
</xsl:if>
</xsl:template> </xsl:template>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment