common/tools/brag/bragForDiamonds.xsl
author Simon Howkins <simonh@symbian.org>
Wed, 14 Oct 2009 10:45:17 +0100
changeset 660 5a3e7da0fee9
parent 587 97d29037659e
child 886 fc600bbaa15c
permissions -rw-r--r--
Replaced section "Package failures by phase/step/severity" with "Package failures by package/severity" Added internal links from the package/severity breakdown to the peices of the new section.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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