author | Simon Howkins <simonh@symbian.org> |
Wed, 07 Apr 2010 14:03:14 +0100 | |
changeset 960 | b0315c337be6 |
parent 902 | 6df3172848e9 |
child 968 | a66215cc2b4a |
permissions | -rw-r--r-- |
581
46df4556c7d9
New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1 |
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
46df4556c7d9
New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
2 |
|
46df4556c7d9
New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
3 |
<!-- Main template --> |
46df4556c7d9
New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
4 |
<xsl:template match="/buildStatus"> |
886
fc600bbaa15c
Fix BRAG status is different as viewed from Diamonds and from the _BRAG.xml page
Dario Sestito <darios@symbian.org>
parents:
587
diff
changeset
|
5 |
<xsl:variable name="criticalCount" select="count(phase/step/failures[@level='critical']/failure)+sum(phase/step/failures[@level='critical']/@count)"/> |
fc600bbaa15c
Fix BRAG status is different as viewed from Diamonds and from the _BRAG.xml page
Dario Sestito <darios@symbian.org>
parents:
587
diff
changeset
|
6 |
<xsl:variable name="majorCount" select="count(phase/step/failures[@level='major']/failure)+sum(phase/step/failures[@level='major']/@count)"/> |
fc600bbaa15c
Fix BRAG status is different as viewed from Diamonds and from the _BRAG.xml page
Dario Sestito <darios@symbian.org>
parents:
587
diff
changeset
|
7 |
<xsl:variable name="minorCount" select="count(phase/step/failures[@level='minor']/failure)+sum(phase/step/failures[@level='minor']/@count)"/> |
fc600bbaa15c
Fix BRAG status is different as viewed from Diamonds and from the _BRAG.xml page
Dario Sestito <darios@symbian.org>
parents:
587
diff
changeset
|
8 |
<xsl:variable name="unknownCount" select="count(phase/step/failures[@level!='critical' and @level!='major' and @level!='minor']/failure)+sum(phase/step/failures[@level!='critical' and @level!='major' and @level!='minor']/@count)"/> |
581
46df4556c7d9
New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
9 |
|
46df4556c7d9
New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
10 |
<diamonds-build> |
587
97d29037659e
Added schema setting, so Diamonds should accept the data.
Simon Howkins <simonh@symbian.org>
parents:
581
diff
changeset
|
11 |
<schema>13</schema> |
581
46df4556c7d9
New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
12 |
<build> |
46df4556c7d9
New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
13 |
<status> |
46df4556c7d9
New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
14 |
<xsl:choose> |
46df4556c7d9
New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
15 |
<xsl:when test="$criticalCount != 0">Black</xsl:when> |
46df4556c7d9
New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
16 |
<xsl:when test="$majorCount != 0">Red</xsl:when> |
902
6df3172848e9
Reviewed rules defining the BRAG status
Dario Sestito <darios@symbian.org>
parents:
886
diff
changeset
|
17 |
<xsl:when test="$unknownCount != 0">Red</xsl:when> |
581
46df4556c7d9
New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
18 |
<xsl:when test="$minorCount != 0">Amber</xsl:when> |
902
6df3172848e9
Reviewed rules defining the BRAG status
Dario Sestito <darios@symbian.org>
parents:
886
diff
changeset
|
19 |
<xsl:otherwise>Green</xsl:otherwise> |
581
46df4556c7d9
New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
20 |
</xsl:choose> |
46df4556c7d9
New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
21 |
</status> |
46df4556c7d9
New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
22 |
</build> |
46df4556c7d9
New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
23 |
</diamonds-build> |
46df4556c7d9
New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
24 |
</xsl:template> |
46df4556c7d9
New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
25 |
|
46df4556c7d9
New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
26 |
</xsl:stylesheet> |
46df4556c7d9
New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
27 |