about summary refs log tree commit diff
path: root/src/nix-log2xml/mark-errors.xsl
blob: 4e91913e570a7a75264b9fc5209e96b936c0022b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?xml version="1.0"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:template match="@*|node()">
    <xsl:copy>
      <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
  </xsl:template>

  <xsl:template match="line">
    <line>
      <xsl:if test="contains(text(), ' *** ') or
                    contains(text(), 'LaTeX Error') or
                    contains(text(), 'FAIL:') or
                    contains(text(), ' error: ') or
                    true">
         <xsl:attribute name="error"></xsl:attribute>
      </xsl:if>
      <xsl:apply-templates select="@*|node()"/>
    </line>
  </xsl:template>
  
</xsl:stylesheet>