<!--
  Author: Michael J Gruber
  Usage:  Bookmark Mozilla Tinderbox pages of your choice
  Notes:  See http://aboutconfig.mozdev.org/stuff.html for tips on how to style the microsummary through css.
--><generator name='Mozilla Tinderbox Microsummary' xmlns='http://www.mozilla.org/microsummaries/0.1'>
   <pages>
     <include>^http://tinderbox\.mozilla\.org/showbuilds\.cgi.*</include>
   </pages>
   <template>
    <xsl:transform version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
    <xsl:output method='text'/>
    <xsl:template match='/'>
      <!-- get tree name -->
      <xsl:variable name='treeName' select='substring-after(substring-before(/html/body/table[2]/tbody/tr/td[1]/table/tbody/tr[2]/td/b,&apos; (&apos;),&apos;:&apos;)'/>
      <xsl:value-of select='$treeName'/> <xsl:text>: </xsl:text>

      <!-- get open/closed -->
      <xsl:value-of select='/html/body//a[@name=&apos;open&apos;]/following::font[1]'/> <xsl:text> (</xsl:text>
        <!-- get burning-ness -->
        <xsl:variable name='numBurning' select='count(//a[@title=&apos;burning&apos;])'/>
        <xsl:variable name='numOrange' select='count(/html/body/table/tbody/tr[1]/td[@bgcolor=&apos;#ffaa00&apos;])'/>
        <xsl:choose>
          <xsl:when test='$numBurning &gt; 0'><xsl:value-of select='$numBurning'/> burning (<xsl:for-each select='//a[@title=&apos;burning&apos;]'><xsl:value-of select='./font'/>, </xsl:for-each>)</xsl:when>
          <xsl:when test='$numOrange &gt; 0'><xsl:value-of select='$numOrange'/> orange</xsl:when>
          <xsl:otherwise><xsl:text>OK</xsl:text></xsl:otherwise>
        </xsl:choose>
      <xsl:text>)</xsl:text>
    </xsl:template>
    </xsl:transform>
   </template>
 </generator>
