author | Maciej Seroka <maciejs@symbian.org> |
Wed, 06 Jan 2010 13:41:51 +0000 | |
changeset 836 | 675529c38614 |
parent 587 | 97d29037659e |
child 886 | fc600bbaa15c |
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"> |
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
|
5 |
<xsl:variable name="criticalCount" select="count(phase/step/failures[@level='critical']/failure)"/> |
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
|
6 |
<xsl:variable name="majorCount" select="count(phase/step/failures[@level='major']/failure)"/> |
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
|
7 |
<xsl:variable name="minorCount" select="count(phase/step/failures[@level='minor']/failure)"/> |
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
|
8 |
<xsl:variable name="unknownCount" select="count(phase/step/failures[@level!='critical' and @level!='major' and @level!='minor']/failure)"/> |
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> |
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
|
17 |
<xsl:when test="$minorCount != 0">Amber</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
|
18 |
<xsl:when test="$unknownCount != 0">Green</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
|
19 |
<xsl:otherwise>Gold</xsl:otherwise> |
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 |