Change parsing of burning boxes to exclide the %.
[AboutConfig.git] / www / mozilla-tinderbox-microsummary.xml
blobb6f7b4100dfe02e9b137c12642f696285a3a7b75
1 <?xml version="1.0" encoding="UTF-8"?>
2 <generator xmlns="http://www.mozilla.org/microsummaries/0.1" name="Mozilla Tinderbox Microsummary">
3    <pages>
4      <include>^http://tinderbox\.mozilla\.org/showbuilds\.cgi.*</include>
5    </pages>
6    <template>
7     <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
8     <xsl:output method="text"/>
9     <xsl:template match="/">
10       <!-- get tree name -->
11       <xsl:variable name="treeName" select="substring-after(substring-before(/html/body/table[2]/tbody/tr/td[1]/table/tbody/tr[2]/td/b,' ('),':')"/>
12       <xsl:value-of select="$treeName"/> <xsl:text>: </xsl:text>
14       <!-- get open/closed -->
15       <xsl:value-of select="/html/body//a[@name='open']/following::font[1]"/> <xsl:text> (</xsl:text>
16         <!-- get burning-ness -->
17         <xsl:variable name="numBurning" select="count(//a[@title='burning'])"/>
18         <xsl:variable name="numOrange" select="count(/html/body/table/tbody/tr[1]/td[@bgcolor='#ffaa00'])"/>
19         <xsl:choose>
20           <xsl:when test="$numBurning &gt; 0"><xsl:value-of select="$numBurning"/> burning (<xsl:for-each select="//a[@title='burning']"><xsl:value-of select="./font"/>, </xsl:for-each>)</xsl:when>
21           <xsl:when test="$numOrange &gt; 0"><xsl:value-of select="$numOrange"/> orange</xsl:when>
22           <xsl:otherwise><xsl:text>OK</xsl:text></xsl:otherwise>
23         </xsl:choose>
24       <xsl:text>)</xsl:text>
25     </xsl:template>
26     </xsl:transform>
27    </template>
28  </generator>