grim/gplate

5c34e52f19c2
Parents 4ac0ba0da721
Children 0cf3395585d6
Moved all suite output into a single table
  • +51 -51
    tests/check.xsl
  • --- a/tests/check.xsl Sun Feb 10 08:33:15 2008 -0600
    +++ b/tests/check.xsl Sun Feb 10 08:43:55 2008 -0600
    @@ -112,61 +112,61 @@
    <a href="javascript:hide_all()">Hide all messages</a>
    </p>
    </div>
    - <xsl:apply-templates/>
    + <table>
    + <xsl:for-each select="check:suite">
    + <xsl:if test="check:test">
    + <tr>
    + <td colspan="2"><h2><xsl:value-of select="check:title"/></h2></td>
    + </tr>
    + <xsl:for-each select="check:test">
    + <tr>
    + <td>
    + <xsl:element name="a">
    + <xsl:attribute name="href">
    + <xsl:text>javascript:toggle('</xsl:text>
    + <xsl:value-of select="check:id"/>
    + <xsl:text>')</xsl:text>
    + </xsl:attribute>
    + <xsl:value-of select="translate(check:id, '_', ' ')"/>
    + </xsl:element>
    + </td>
    + <td>
    + <xsl:choose>
    + <xsl:when test="@result='success'">
    + <img src="passed.png" alt="passed"/>
    + </xsl:when>
    + <xsl:otherwise>
    + <img src="failed.png" alt="failed"/>
    + </xsl:otherwise>
    + </xsl:choose>
    + </td>
    + <td>
    + <xsl:element name="div">
    + <xsl:attribute name="id">
    + <xsl:value-of select="check:id"/>
    + </xsl:attribute>
    + <xsl:attribute name="class">
    + <xsl:choose>
    + <xsl:when test="@result='success'">
    + <xsl:text>passed-message</xsl:text>
    + </xsl:when>
    + <xsl:otherwise>
    + <xsl:text>failed-message</xsl:text>
    + </xsl:otherwise>
    + </xsl:choose>
    + </xsl:attribute>
    + <pre><xsl:value-of select="check:message"/></pre>
    + </xsl:element>
    + </td>
    + </tr>
    + </xsl:for-each>
    + </xsl:if>
    + </xsl:for-each>
    + </table>
    </body>
    </html>
    </xsl:template>
    - <xsl:template match="check:suite">
    - <xsl:if test="check:test">
    - <h2><xsl:value-of select="check:title"/></h2>
    - <table>
    - <xsl:for-each select="check:test">
    - <tr>
    - <td>
    - <xsl:element name="a">
    - <xsl:attribute name="href">
    - <xsl:text>javascript:toggle('</xsl:text>
    - <xsl:value-of select="check:id"/>
    - <xsl:text>')</xsl:text>
    - </xsl:attribute>
    - <xsl:value-of select="translate(check:id, '_', ' ')"/>
    - </xsl:element>
    - </td>
    - <td>
    - <xsl:choose>
    - <xsl:when test="@result='success'">
    - <img src="passed.png" alt="passed"/>
    - </xsl:when>
    - <xsl:otherwise>
    - <img src="failed.png" alt="failed"/>
    - </xsl:otherwise>
    - </xsl:choose>
    - </td>
    - <td>
    - <xsl:element name="div">
    - <xsl:attribute name="id">
    - <xsl:value-of select="check:id"/>
    - </xsl:attribute>
    - <xsl:attribute name="class">
    - <xsl:choose>
    - <xsl:when test="@result='success'">
    - <xsl:text>passed-message</xsl:text>
    - </xsl:when>
    - <xsl:otherwise>
    - <xsl:text>failed-message</xsl:text>
    - </xsl:otherwise>
    - </xsl:choose>
    - </xsl:attribute>
    - <pre><xsl:value-of select="check:message"/></pre>
    - </xsl:element>
    - </td>
    - </tr>
    - </xsl:for-each>
    - </table>
    - </xsl:if>
    - </xsl:template>
    -
    <!-- these too are handled manually earlier, but need matches to not be
    rendered separately.
    -->