2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3 <xsl:output method="html" indent="yes"
4 doctype-public="-//W3C//DTD HTML 4.01//EN"
5 doctype-system="http://www.w3.org/TR/html4/strict.dtd"/>
7 <xsl:template name="resultcell" match="result/*/*">
8 <xsl:element name="div">
9 <xsl:if test="contains(text(), 'ok')">
10 <xsl:attribute name="style">background-color: green; color: white;</xsl:attribute>
12 <xsl:if test="contains(text(), 'failed')">
13 <xsl:attribute name="style">background-color: red; color: white;</xsl:attribute>
17 <xsl:when test="name() = 'gcc_run'">
18 <xsl:element name="a">
20 <xsl:when test="contains(text(), 'ok') or contains(text(), 'failed')">
21 <xsl:attribute name="style">color: white;</xsl:attribute>
24 <xsl:attribute name="style">color: black;</xsl:attribute>
28 <xsl:when test="name(..) = 'OLD'">
29 <xsl:attribute name="href"><xsl:value-of select="substring(/results/files/OLD, 0, 15)"/>/result_gcc_<xsl:value-of select="../../@name"/>.txt</xsl:attribute>
32 <xsl:attribute name="href"><xsl:value-of select="substring(/results/files/NEW, 0, 15)"/>/result_gcc_<xsl:value-of select="../../@name"/>.txt</xsl:attribute>
35 <xsl:value-of select="text()"/>
38 <xsl:when test="name() = 'firm_run'">
39 <xsl:element name="a">
41 <xsl:when test="contains(text(), 'ok') or contains(text(), 'failed')">
42 <xsl:attribute name="style">color: white;</xsl:attribute>
45 <xsl:attribute name="style">color: black;</xsl:attribute>
49 <xsl:when test="name(..) = 'OLD'">
50 <xsl:attribute name="href">
51 <xsl:value-of select="substring(/results/files/OLD, 0, 15)"/>/result_firm_<xsl:value-of select="../../@name"/>.txt</xsl:attribute></xsl:when>
53 <xsl:attribute name="href"><xsl:value-of select="substring(/results/files/NEW, 0, 15)"/>/result_firm_<xsl:value-of select="../../@name"/>.txt</xsl:attribute>
56 <xsl:value-of select="text()"/>
59 <xsl:when test="name() = 'diff'">
60 <xsl:element name="a">
62 <xsl:when test="contains(text(), 'ok') or contains(text(), 'failed')">
63 <xsl:attribute name="style">color: white;</xsl:attribute>
66 <xsl:attribute name="style">color: black;</xsl:attribute>
70 <xsl:when test="name(..) = 'OLD'">
71 <xsl:attribute name="href"><xsl:value-of select="substring(/results/files/OLD, 0, 15)"/>/result_diff_<xsl:value-of select="../../@name"/>.txt</xsl:attribute>
74 <xsl:attribute name="href"><xsl:value-of select="substring(/results/files/NEW, 0, 15)"/>/result_diff_<xsl:value-of select="../../@name"/>.txt</xsl:attribute>
77 <xsl:value-of select="text()"/>
81 <xsl:value-of select="text()"/>
87 <xsl:template match="/">
90 <title>Results</title>
93 OLD: <xsl:value-of select="/results/files/OLD"/><br/>
94 NEW: <xsl:value-of select="/results/files/NEW"/><br/><br/>
105 <xsl:for-each select="/results/section">
107 <th colspan="7" style="background-color: yellow; color: black;"><xsl:value-of select="@name"/></th>
109 <xsl:for-each select="result">
112 <xsl:element name="a">
113 <xsl:attribute name="href">buildresult_<xsl:value-of select="@name"/>.txt</xsl:attribute>
114 <xsl:value-of select="@name"/>
117 <td><xsl:apply-templates select="OLD/compile"/></td>
118 <td><xsl:apply-templates select="OLD/link"/></td>
119 <td><xsl:apply-templates select="OLD/gcc_compile"/></td>
120 <td><xsl:apply-templates select="OLD/gcc_run"/></td>
121 <td><xsl:apply-templates select="OLD/firm_run"/></td>
122 <td><xsl:apply-templates select="OLD/diff"/></td>
125 <td><xsl:apply-templates select="NEW/compile"/></td>
126 <td><xsl:apply-templates select="NEW/link"/></td>
127 <td><xsl:apply-templates select="NEW/gcc_compile"/></td>
128 <td><xsl:apply-templates select="NEW/gcc_run"/></td>
129 <td><xsl:apply-templates select="NEW/firm_run"/></td>
130 <td><xsl:apply-templates select="NEW/diff"/></td>
133 <th colspan="7"> </th>