about summary refs log tree commit diff
path: root/src/log2xml/log2html.xsl
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2004-03-18T14·58+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2004-03-18T14·58+0000
commitc2fc2c13c981e28ff673221da47cc93a7ed9291f (patch)
tree2bd9c89b95b35511460350efde6f83a467a7a334 /src/log2xml/log2html.xsl
parenta784fd5792a5447ad2b7dac63bea2a0b2fc379c3 (diff)
* Use unordered lists, which is more sensible semantically for
  representing tree structures.

Diffstat (limited to 'src/log2xml/log2html.xsl')
-rw-r--r--src/log2xml/log2html.xsl49
1 files changed, 22 insertions, 27 deletions
diff --git a/src/log2xml/log2html.xsl b/src/log2xml/log2html.xsl
index 4a9a6f4527be..cb56a3cb4bf8 100644
--- a/src/log2xml/log2html.xsl
+++ b/src/log2xml/log2html.xsl
@@ -1,7 +1,9 @@
 <?xml version="1.0"?>
 
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-  
+
+  <xsl:output method='html' />
+
   <xsl:template match="logfile">
     <html>
       <head>
@@ -9,37 +11,30 @@
         <title>Log File</title>
       </head>
       <body>
-        <xsl:apply-templates/>
+        <ul class='toplevel'>
+          <xsl:for-each select='line|nest'>
+            <li>
+              <xsl:apply-templates select='.'/>
+            </li>
+          </xsl:for-each>
+        </ul>
       </body>
     </html>
   </xsl:template>
 
   <xsl:template match="nest">
-    <div class='nesting'>
-      <div class='head'>
-        <xsl:apply-templates select='head'/>
-      </div>
-      <blockquote class='body'>
-        <xsl:for-each select='line|nest'>
-          <xsl:if test="position() != last()">
-            <div class='line'>
-              <span class='lineconn' />
-              <span class='linebody'>
-                <xsl:apply-templates select='.'/>
-              </span>
-            </div>
-          </xsl:if>
-          <xsl:if test="position() = last()">
-            <div class='lastline'>
-              <span class='lineconn' />
-              <span class='linebody'>
-                <xsl:apply-templates select='.'/>
-              </span>
-            </div>
-          </xsl:if>
-        </xsl:for-each>
-      </blockquote>
-    </div>
+    <xsl:apply-templates select='head'/>
+    <ul class='nesting'>
+      <xsl:for-each select='line|nest'>
+        <xsl:param name="class"><xsl:choose><xsl:when test="position() != last()">line</xsl:when><xsl:otherwise>lastline</xsl:otherwise></xsl:choose></xsl:param>
+        <li class='{$class}'>
+          <span class='lineconn' />
+          <span class='linebody'>
+            <xsl:apply-templates select='.'/>
+          </span>
+        </li>
+      </xsl:for-each>
+    </ul>
   </xsl:template>
   
   <xsl:template match="head|line">