about summary refs log tree commit diff
path: root/src/log2xml/log2html.xsl
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-08-01T13·23+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-08-01T13·23+0000
commit800a6ff845ff951ff54a43fd4098b2e505f6eb02 (patch)
treed49f1fc29bb6927abf657cbcdaf248adde7b3890 /src/log2xml/log2html.xsl
parent78c72bf10eee4db5f2eb3f7caba8f46e5be51a0e (diff)
* Mark error lines in red, and expand subtrees containing errors
  automatically.

Diffstat (limited to 'src/log2xml/log2html.xsl')
-rw-r--r--src/log2xml/log2html.xsl11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/log2xml/log2html.xsl b/src/log2xml/log2html.xsl
index f75b2eb86fb5..0718df230f26 100644
--- a/src/log2xml/log2html.xsl
+++ b/src/log2xml/log2html.xsl
@@ -23,12 +23,14 @@
     </html>
   </xsl:template>
 
+  
   <xsl:template match="nest">
 
     <!-- The tree should be collapsed by default if all children are
          unimportant or if the header is unimportant. -->
-    <xsl:variable name="collapsed"
-                  select="count(.//line[not(@priority = 3)]) = 0 or ./head[@priority = 3]" />
+<!--    <xsl:variable name="collapsed"
+                  select="count(.//line[not(@priority = 3)]) = 0 or ./head[@priority = 3]" /> -->
+    <xsl:variable name="collapsed" select="count(.//*[@error]) = 0"/>
                   
     <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>
@@ -52,13 +54,18 @@
       </xsl:for-each>
     </ul>
   </xsl:template>
+
   
   <xsl:template match="head|line">
     <code>
+      <xsl:if test="@error">
+        <xsl:attribute name="class">error</xsl:attribute>
+      </xsl:if>
       <xsl:apply-templates/>
     </code>
   </xsl:template>
 
+  
   <xsl:template match="storeref">
     <em class='storeref'>
       <span class='popup'><xsl:apply-templates/></span>