common/tools/brag/brag.xsl
author Simon Howkins <simonh@symbian.org>
Fri, 16 Oct 2009 15:11:28 +0100
changeset 680 81550e87fc91
parent 660 5a3e7da0fee9
child 753 5069de517698
permissions -rw-r--r--
Moved the generation of the release metadata entry for the MD5 zip outside of the parallel section, so it can't co-incide with the zipping of the binaries. Ensured that any errors generated when merging log files are not just hidden by putting them in the output file (which will render it not well-formed XML).
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
547
19f9d5fc6406 Added really basic failure extraction and BRAG calculation to build.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
     1
<xsl:stylesheet version="1.0"
557
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
     2
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/xpath-functions">
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
     3
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
     4
<!-- Initialise keys (sort of like hashes?) to enable us to list distinct packages/severities -->
569
5af7cc0d44a1 Adfjusted XML format used, so there's a document-level tag - <buildStatus> which can wrap multiple <phase> tags.
Simon Howkins <simonh@symbian.org>
parents: 557
diff changeset
     5
<xsl:key name="packages" match="failure" use="@package"/>
651
bb57a09ece7a Added tables for eack package with failures, broken down by severity.
Simon Howkins <simonh@symbian.org>
parents: 606
diff changeset
     6
<xsl:key name="severities" match="/buildStatus/phase/step/failures" use="@level"/>
bb57a09ece7a Added tables for eack package with failures, broken down by severity.
Simon Howkins <simonh@symbian.org>
parents: 606
diff changeset
     7
<xsl:key name="packageANDseverity" match="/buildStatus/phase/step/failures[@level]/failure[@package]" use="concat(../@level, @package)"/>
557
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
     8
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
     9
<!-- Main template -->
569
5af7cc0d44a1 Adfjusted XML format used, so there's a document-level tag - <buildStatus> which can wrap multiple <phase> tags.
Simon Howkins <simonh@symbian.org>
parents: 557
diff changeset
    10
<xsl:template match="/buildStatus">
547
19f9d5fc6406 Added really basic failure extraction and BRAG calculation to build.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    11
	<html>
19f9d5fc6406 Added really basic failure extraction and BRAG calculation to build.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    12
	<head><title>Build Status</title></head>
19f9d5fc6406 Added really basic failure extraction and BRAG calculation to build.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    13
	<body>
557
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
    14
	<h1>Build Status</h1>
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
    15
569
5af7cc0d44a1 Adfjusted XML format used, so there's a document-level tag - <buildStatus> which can wrap multiple <phase> tags.
Simon Howkins <simonh@symbian.org>
parents: 557
diff changeset
    16
	<xsl:variable name="criticalCount" select="count(phase/step/failures[@level='critical']/failure)"/>
5af7cc0d44a1 Adfjusted XML format used, so there's a document-level tag - <buildStatus> which can wrap multiple <phase> tags.
Simon Howkins <simonh@symbian.org>
parents: 557
diff changeset
    17
	<xsl:variable name="majorCount" select="count(phase/step/failures[@level='major']/failure)"/>
5af7cc0d44a1 Adfjusted XML format used, so there's a document-level tag - <buildStatus> which can wrap multiple <phase> tags.
Simon Howkins <simonh@symbian.org>
parents: 557
diff changeset
    18
	<xsl:variable name="minorCount" select="count(phase/step/failures[@level='minor']/failure)"/>
5af7cc0d44a1 Adfjusted XML format used, so there's a document-level tag - <buildStatus> which can wrap multiple <phase> tags.
Simon Howkins <simonh@symbian.org>
parents: 557
diff changeset
    19
	<xsl:variable name="unknownCount" select="count(phase/step/failures[@level!='critical' and @level!='major' and @level!='minor']/failure)"/>
557
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
    20
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
    21
	<h2>
606
7441b114b8c8 Adjustsed BRAG to BRAGG, to accommodate the possibility of there being Green builds and Gold builds.
Simon Howkins <simonh@symbian.org>
parents: 569
diff changeset
    22
	Overall BRAGG staus: 
557
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
    23
	<xsl:choose>
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
    24
		<xsl:when test="$criticalCount != 0">BLACK</xsl:when>
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
    25
		<xsl:when test="$majorCount != 0">RED</xsl:when>
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
    26
		<xsl:when test="$minorCount != 0">AMBER</xsl:when>
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
    27
		<xsl:when test="$unknownCount != 0">GREEN</xsl:when>
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
    28
		<xsl:otherwise>GOLD!</xsl:otherwise>
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
    29
	</xsl:choose>
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
    30
	</h2>
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
    31
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
    32
	<h2>Breakdown by severity</h2>
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
    33
	<table border="1">
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
    34
	<tr><td>Critical</td><td><xsl:value-of select="$criticalCount"/></td></tr>
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
    35
	<tr><td>Major</td><td><xsl:value-of select="$majorCount"/></td></tr>
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
    36
	<tr><td>Minor</td><td><xsl:value-of select="$minorCount"/></td></tr>
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
    37
	<tr><td>Unknown</td><td><xsl:value-of select="$unknownCount"/></td></tr>
569
5af7cc0d44a1 Adfjusted XML format used, so there's a document-level tag - <buildStatus> which can wrap multiple <phase> tags.
Simon Howkins <simonh@symbian.org>
parents: 557
diff changeset
    38
	<tr><th>Grand total</th><th><xsl:value-of select="count(phase/step/failures/failure)"/></th></tr>
557
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
    39
	</table>
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
    40
569
5af7cc0d44a1 Adfjusted XML format used, so there's a document-level tag - <buildStatus> which can wrap multiple <phase> tags.
Simon Howkins <simonh@symbian.org>
parents: 557
diff changeset
    41
	<h2>Breakdown by phase/step</h2>
547
19f9d5fc6406 Added really basic failure extraction and BRAG calculation to build.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    42
	<table border="1">
19f9d5fc6406 Added really basic failure extraction and BRAG calculation to build.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    43
569
5af7cc0d44a1 Adfjusted XML format used, so there's a document-level tag - <buildStatus> which can wrap multiple <phase> tags.
Simon Howkins <simonh@symbian.org>
parents: 557
diff changeset
    44
	<xsl:for-each select="phase">
547
19f9d5fc6406 Added really basic failure extraction and BRAG calculation to build.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    45
		<tr>
569
5af7cc0d44a1 Adfjusted XML format used, so there's a document-level tag - <buildStatus> which can wrap multiple <phase> tags.
Simon Howkins <simonh@symbian.org>
parents: 557
diff changeset
    46
		<th colspan='2'>Phase: <xsl:value-of select="@name"/></th>
547
19f9d5fc6406 Added really basic failure extraction and BRAG calculation to build.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    47
		</tr>
19f9d5fc6406 Added really basic failure extraction and BRAG calculation to build.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    48
		<xsl:for-each select="step">
19f9d5fc6406 Added really basic failure extraction and BRAG calculation to build.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    49
			<tr>
557
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
    50
			<td colspan='2'>Step: <xsl:value-of select="@name"/></td>
547
19f9d5fc6406 Added really basic failure extraction and BRAG calculation to build.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    51
			</tr>
19f9d5fc6406 Added really basic failure extraction and BRAG calculation to build.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    52
			<xsl:for-each select="failures">
19f9d5fc6406 Added really basic failure extraction and BRAG calculation to build.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    53
				<tr>
19f9d5fc6406 Added really basic failure extraction and BRAG calculation to build.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    54
				<td>Failures: <xsl:value-of select="@level"/></td>
19f9d5fc6406 Added really basic failure extraction and BRAG calculation to build.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    55
				<td>Number: <xsl:value-of select="count(failure)"/></td>
19f9d5fc6406 Added really basic failure extraction and BRAG calculation to build.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    56
				</tr>
19f9d5fc6406 Added really basic failure extraction and BRAG calculation to build.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    57
			</xsl:for-each>
19f9d5fc6406 Added really basic failure extraction and BRAG calculation to build.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    58
		</xsl:for-each>
19f9d5fc6406 Added really basic failure extraction and BRAG calculation to build.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    59
	</xsl:for-each>
19f9d5fc6406 Added really basic failure extraction and BRAG calculation to build.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    60
19f9d5fc6406 Added really basic failure extraction and BRAG calculation to build.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    61
	</table>
19f9d5fc6406 Added really basic failure extraction and BRAG calculation to build.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    62
557
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
    63
	<!-- If any failures are tied to a specific package... -->
569
5af7cc0d44a1 Adfjusted XML format used, so there's a document-level tag - <buildStatus> which can wrap multiple <phase> tags.
Simon Howkins <simonh@symbian.org>
parents: 557
diff changeset
    64
	<xsl:if test="phase/step/failures/failure[@package]">
557
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
    65
		<h2>Breakdown by package</h2>
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
    66
		<table border="1">
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
    67
		<tr><th>Package</th><th>Total failures</th></tr>
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
    68
		<!-- Use the Muenchian Method to get a set of distinct packages -->
569
5af7cc0d44a1 Adfjusted XML format used, so there's a document-level tag - <buildStatus> which can wrap multiple <phase> tags.
Simon Howkins <simonh@symbian.org>
parents: 557
diff changeset
    69
		<xsl:for-each select="phase/step/failures/failure[generate-id(.) = generate-id(key('packages', @package))]">
557
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
    70
			<xsl:sort select="@package"/>
651
bb57a09ece7a Added tables for eack package with failures, broken down by severity.
Simon Howkins <simonh@symbian.org>
parents: 606
diff changeset
    71
			<tr>
bb57a09ece7a Added tables for eack package with failures, broken down by severity.
Simon Howkins <simonh@symbian.org>
parents: 606
diff changeset
    72
			<td><a><xsl:attribute name="href"><xsl:value-of select="concat('#package', @package)"/></xsl:attribute><xsl:value-of select="@package"/></a></td>
bb57a09ece7a Added tables for eack package with failures, broken down by severity.
Simon Howkins <simonh@symbian.org>
parents: 606
diff changeset
    73
			<td><xsl:value-of select="count(key('packages', @package))"/></td>
bb57a09ece7a Added tables for eack package with failures, broken down by severity.
Simon Howkins <simonh@symbian.org>
parents: 606
diff changeset
    74
			</tr>
557
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
    75
		</xsl:for-each>
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
    76
		</table>
651
bb57a09ece7a Added tables for eack package with failures, broken down by severity.
Simon Howkins <simonh@symbian.org>
parents: 606
diff changeset
    77
bb57a09ece7a Added tables for eack package with failures, broken down by severity.
Simon Howkins <simonh@symbian.org>
parents: 606
diff changeset
    78
		<h2>Breakdown by package/severity</h2>
bb57a09ece7a Added tables for eack package with failures, broken down by severity.
Simon Howkins <simonh@symbian.org>
parents: 606
diff changeset
    79
		<xsl:for-each select="phase/step/failures[@level]/failure[generate-id(.) = generate-id(key('packages', @package))]">
bb57a09ece7a Added tables for eack package with failures, broken down by severity.
Simon Howkins <simonh@symbian.org>
parents: 606
diff changeset
    80
			<xsl:sort select="@package"/>
bb57a09ece7a Added tables for eack package with failures, broken down by severity.
Simon Howkins <simonh@symbian.org>
parents: 606
diff changeset
    81
			<xsl:variable name="package" select="@package"/>
bb57a09ece7a Added tables for eack package with failures, broken down by severity.
Simon Howkins <simonh@symbian.org>
parents: 606
diff changeset
    82
			<a><xsl:attribute name="name"><xsl:value-of select="concat('package', $package)"/></xsl:attribute>
bb57a09ece7a Added tables for eack package with failures, broken down by severity.
Simon Howkins <simonh@symbian.org>
parents: 606
diff changeset
    83
			<h3><xsl:value-of select="$package"/></h3>
bb57a09ece7a Added tables for eack package with failures, broken down by severity.
Simon Howkins <simonh@symbian.org>
parents: 606
diff changeset
    84
			</a>
bb57a09ece7a Added tables for eack package with failures, broken down by severity.
Simon Howkins <simonh@symbian.org>
parents: 606
diff changeset
    85
			<table border="1">
bb57a09ece7a Added tables for eack package with failures, broken down by severity.
Simon Howkins <simonh@symbian.org>
parents: 606
diff changeset
    86
			<tr><th>Severity</th><th>Count</th></tr>
bb57a09ece7a Added tables for eack package with failures, broken down by severity.
Simon Howkins <simonh@symbian.org>
parents: 606
diff changeset
    87
			<xsl:for-each select="/buildStatus/phase/step/failures[generate-id(.) = generate-id(key('severities', @level))]">
bb57a09ece7a Added tables for eack package with failures, broken down by severity.
Simon Howkins <simonh@symbian.org>
parents: 606
diff changeset
    88
				<xsl:variable name="severity" select="@level"/>
bb57a09ece7a Added tables for eack package with failures, broken down by severity.
Simon Howkins <simonh@symbian.org>
parents: 606
diff changeset
    89
				<tr>
660
5a3e7da0fee9 Replaced section "Package failures by phase/step/severity" with "Package failures by package/severity"
Simon Howkins <simonh@symbian.org>
parents: 652
diff changeset
    90
				<td><a>
5a3e7da0fee9 Replaced section "Package failures by phase/step/severity" with "Package failures by package/severity"
Simon Howkins <simonh@symbian.org>
parents: 652
diff changeset
    91
				<xsl:if test="count(/buildStatus/phase/step/failures[@level = $severity]/failure[@package = $package]) != 0">
5a3e7da0fee9 Replaced section "Package failures by phase/step/severity" with "Package failures by package/severity"
Simon Howkins <simonh@symbian.org>
parents: 652
diff changeset
    92
					<xsl:attribute name="href"><xsl:value-of select="concat('#', $severity, $package)"/></xsl:attribute>
5a3e7da0fee9 Replaced section "Package failures by phase/step/severity" with "Package failures by package/severity"
Simon Howkins <simonh@symbian.org>
parents: 652
diff changeset
    93
				</xsl:if>
5a3e7da0fee9 Replaced section "Package failures by phase/step/severity" with "Package failures by package/severity"
Simon Howkins <simonh@symbian.org>
parents: 652
diff changeset
    94
				<xsl:value-of select="$severity"/></a></td>
651
bb57a09ece7a Added tables for eack package with failures, broken down by severity.
Simon Howkins <simonh@symbian.org>
parents: 606
diff changeset
    95
				<td><xsl:value-of select="count(key('packageANDseverity', concat($severity, $package)))"/></td>
bb57a09ece7a Added tables for eack package with failures, broken down by severity.
Simon Howkins <simonh@symbian.org>
parents: 606
diff changeset
    96
				</tr>
bb57a09ece7a Added tables for eack package with failures, broken down by severity.
Simon Howkins <simonh@symbian.org>
parents: 606
diff changeset
    97
			</xsl:for-each>
bb57a09ece7a Added tables for eack package with failures, broken down by severity.
Simon Howkins <simonh@symbian.org>
parents: 606
diff changeset
    98
			</table>
bb57a09ece7a Added tables for eack package with failures, broken down by severity.
Simon Howkins <simonh@symbian.org>
parents: 606
diff changeset
    99
		</xsl:for-each>
557
c6145fb2403d Reordered output, so information is presented in a high-level -> low-level way
Simon Howkins <simonh@symbian.org>
parents: 547
diff changeset
   100
	</xsl:if>
547
19f9d5fc6406 Added really basic failure extraction and BRAG calculation to build.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
   101
652
7c066cc959c2 Added lists of error messages themselves, categorised by phase, step, ...
Simon Howkins <simonh@symbian.org>
parents: 651
diff changeset
   102
	<h2>Floating failures by phase/step/severity</h2>
7c066cc959c2 Added lists of error messages themselves, categorised by phase, step, ...
Simon Howkins <simonh@symbian.org>
parents: 651
diff changeset
   103
	<xsl:if test="count(phase/step/failures/failure/@package) = count(phase/step/failures/failure)">
7c066cc959c2 Added lists of error messages themselves, categorised by phase, step, ...
Simon Howkins <simonh@symbian.org>
parents: 651
diff changeset
   104
		<p>No errors independent of package</p>
7c066cc959c2 Added lists of error messages themselves, categorised by phase, step, ...
Simon Howkins <simonh@symbian.org>
parents: 651
diff changeset
   105
	</xsl:if>
7c066cc959c2 Added lists of error messages themselves, categorised by phase, step, ...
Simon Howkins <simonh@symbian.org>
parents: 651
diff changeset
   106
	<xsl:for-each select="phase[count(step/failures/failure/@package) != count(step/failures/failure)]">
7c066cc959c2 Added lists of error messages themselves, categorised by phase, step, ...
Simon Howkins <simonh@symbian.org>
parents: 651
diff changeset
   107
		<h3>Phase: <xsl:value-of select="@name"/></h3>
7c066cc959c2 Added lists of error messages themselves, categorised by phase, step, ...
Simon Howkins <simonh@symbian.org>
parents: 651
diff changeset
   108
		<xsl:for-each select="step[count(failures/failure/@package) != count(failures/failure)]">
7c066cc959c2 Added lists of error messages themselves, categorised by phase, step, ...
Simon Howkins <simonh@symbian.org>
parents: 651
diff changeset
   109
			<h4>Step: <xsl:value-of select="@name"/></h4>
7c066cc959c2 Added lists of error messages themselves, categorised by phase, step, ...
Simon Howkins <simonh@symbian.org>
parents: 651
diff changeset
   110
			<xsl:for-each select="failures[count(failure/@package) != count(failure)]">
7c066cc959c2 Added lists of error messages themselves, categorised by phase, step, ...
Simon Howkins <simonh@symbian.org>
parents: 651
diff changeset
   111
				<dl><dt><xsl:value-of select="@level"/></dt><dd>
7c066cc959c2 Added lists of error messages themselves, categorised by phase, step, ...
Simon Howkins <simonh@symbian.org>
parents: 651
diff changeset
   112
				<ul>
7c066cc959c2 Added lists of error messages themselves, categorised by phase, step, ...
Simon Howkins <simonh@symbian.org>
parents: 651
diff changeset
   113
				<xsl:for-each select="failure[count(@package) = 0]">
7c066cc959c2 Added lists of error messages themselves, categorised by phase, step, ...
Simon Howkins <simonh@symbian.org>
parents: 651
diff changeset
   114
					<li><xsl:value-of select="."/></li>
7c066cc959c2 Added lists of error messages themselves, categorised by phase, step, ...
Simon Howkins <simonh@symbian.org>
parents: 651
diff changeset
   115
				</xsl:for-each>
7c066cc959c2 Added lists of error messages themselves, categorised by phase, step, ...
Simon Howkins <simonh@symbian.org>
parents: 651
diff changeset
   116
				</ul>
7c066cc959c2 Added lists of error messages themselves, categorised by phase, step, ...
Simon Howkins <simonh@symbian.org>
parents: 651
diff changeset
   117
				</dd></dl>
7c066cc959c2 Added lists of error messages themselves, categorised by phase, step, ...
Simon Howkins <simonh@symbian.org>
parents: 651
diff changeset
   118
			</xsl:for-each>
7c066cc959c2 Added lists of error messages themselves, categorised by phase, step, ...
Simon Howkins <simonh@symbian.org>
parents: 651
diff changeset
   119
		</xsl:for-each>
7c066cc959c2 Added lists of error messages themselves, categorised by phase, step, ...
Simon Howkins <simonh@symbian.org>
parents: 651
diff changeset
   120
	</xsl:for-each>
7c066cc959c2 Added lists of error messages themselves, categorised by phase, step, ...
Simon Howkins <simonh@symbian.org>
parents: 651
diff changeset
   121
660
5a3e7da0fee9 Replaced section "Package failures by phase/step/severity" with "Package failures by package/severity"
Simon Howkins <simonh@symbian.org>
parents: 652
diff changeset
   122
	<h2>Package failures by package/severity</h2>
652
7c066cc959c2 Added lists of error messages themselves, categorised by phase, step, ...
Simon Howkins <simonh@symbian.org>
parents: 651
diff changeset
   123
	<xsl:if test="count(phase/step/failures/failure/@package) = 0">
7c066cc959c2 Added lists of error messages themselves, categorised by phase, step, ...
Simon Howkins <simonh@symbian.org>
parents: 651
diff changeset
   124
		<p>No errors specific to a package</p>
7c066cc959c2 Added lists of error messages themselves, categorised by phase, step, ...
Simon Howkins <simonh@symbian.org>
parents: 651
diff changeset
   125
	</xsl:if>
660
5a3e7da0fee9 Replaced section "Package failures by phase/step/severity" with "Package failures by package/severity"
Simon Howkins <simonh@symbian.org>
parents: 652
diff changeset
   126
	<xsl:for-each select="phase/step/failures[@level]/failure[generate-id(.) = generate-id(key('packages', @package))]">
5a3e7da0fee9 Replaced section "Package failures by phase/step/severity" with "Package failures by package/severity"
Simon Howkins <simonh@symbian.org>
parents: 652
diff changeset
   127
		<xsl:sort select="@package"/>
5a3e7da0fee9 Replaced section "Package failures by phase/step/severity" with "Package failures by package/severity"
Simon Howkins <simonh@symbian.org>
parents: 652
diff changeset
   128
		<xsl:variable name="package" select="@package"/>
5a3e7da0fee9 Replaced section "Package failures by phase/step/severity" with "Package failures by package/severity"
Simon Howkins <simonh@symbian.org>
parents: 652
diff changeset
   129
		<a><xsl:attribute name="name"><xsl:value-of select="concat('package', $package)"/></xsl:attribute>
5a3e7da0fee9 Replaced section "Package failures by phase/step/severity" with "Package failures by package/severity"
Simon Howkins <simonh@symbian.org>
parents: 652
diff changeset
   130
		<h3><xsl:value-of select="$package"/></h3>
5a3e7da0fee9 Replaced section "Package failures by phase/step/severity" with "Package failures by package/severity"
Simon Howkins <simonh@symbian.org>
parents: 652
diff changeset
   131
		</a>
5a3e7da0fee9 Replaced section "Package failures by phase/step/severity" with "Package failures by package/severity"
Simon Howkins <simonh@symbian.org>
parents: 652
diff changeset
   132
		<xsl:for-each select="/buildStatus/phase/step/failures[generate-id(.) = generate-id(key('severities', @level))]">
5a3e7da0fee9 Replaced section "Package failures by phase/step/severity" with "Package failures by package/severity"
Simon Howkins <simonh@symbian.org>
parents: 652
diff changeset
   133
			<xsl:variable name="severity" select="@level"/>
5a3e7da0fee9 Replaced section "Package failures by phase/step/severity" with "Package failures by package/severity"
Simon Howkins <simonh@symbian.org>
parents: 652
diff changeset
   134
			<xsl:if test="count(/buildStatus/phase/step/failures[@level = $severity]/failure[@package = $package]) != 0">
5a3e7da0fee9 Replaced section "Package failures by phase/step/severity" with "Package failures by package/severity"
Simon Howkins <simonh@symbian.org>
parents: 652
diff changeset
   135
				<dl><dt><a><xsl:attribute name="name"><xsl:value-of select="concat($severity, $package)"/></xsl:attribute>
5a3e7da0fee9 Replaced section "Package failures by phase/step/severity" with "Package failures by package/severity"
Simon Howkins <simonh@symbian.org>
parents: 652
diff changeset
   136
					<xsl:value-of select="$severity"/> (<xsl:value-of select="count(/buildStatus/phase/step/failures[@level = $severity]/failure[@package = $package])"/>)
5a3e7da0fee9 Replaced section "Package failures by phase/step/severity" with "Package failures by package/severity"
Simon Howkins <simonh@symbian.org>
parents: 652
diff changeset
   137
				</a></dt><dd>
652
7c066cc959c2 Added lists of error messages themselves, categorised by phase, step, ...
Simon Howkins <simonh@symbian.org>
parents: 651
diff changeset
   138
				<ul>
660
5a3e7da0fee9 Replaced section "Package failures by phase/step/severity" with "Package failures by package/severity"
Simon Howkins <simonh@symbian.org>
parents: 652
diff changeset
   139
				<xsl:for-each select="/buildStatus/phase/step/failures[@level = $severity]/failure[@package = $package]">
652
7c066cc959c2 Added lists of error messages themselves, categorised by phase, step, ...
Simon Howkins <simonh@symbian.org>
parents: 651
diff changeset
   140
					<xsl:sort select="@package"/>
7c066cc959c2 Added lists of error messages themselves, categorised by phase, step, ...
Simon Howkins <simonh@symbian.org>
parents: 651
diff changeset
   141
					<li><xsl:value-of select="@package"/>: <xsl:value-of select="."/></li>
7c066cc959c2 Added lists of error messages themselves, categorised by phase, step, ...
Simon Howkins <simonh@symbian.org>
parents: 651
diff changeset
   142
				</xsl:for-each>
7c066cc959c2 Added lists of error messages themselves, categorised by phase, step, ...
Simon Howkins <simonh@symbian.org>
parents: 651
diff changeset
   143
				</ul>
7c066cc959c2 Added lists of error messages themselves, categorised by phase, step, ...
Simon Howkins <simonh@symbian.org>
parents: 651
diff changeset
   144
				</dd></dl>
660
5a3e7da0fee9 Replaced section "Package failures by phase/step/severity" with "Package failures by package/severity"
Simon Howkins <simonh@symbian.org>
parents: 652
diff changeset
   145
			</xsl:if>
652
7c066cc959c2 Added lists of error messages themselves, categorised by phase, step, ...
Simon Howkins <simonh@symbian.org>
parents: 651
diff changeset
   146
		</xsl:for-each>
7c066cc959c2 Added lists of error messages themselves, categorised by phase, step, ...
Simon Howkins <simonh@symbian.org>
parents: 651
diff changeset
   147
	</xsl:for-each>
7c066cc959c2 Added lists of error messages themselves, categorised by phase, step, ...
Simon Howkins <simonh@symbian.org>
parents: 651
diff changeset
   148
547
19f9d5fc6406 Added really basic failure extraction and BRAG calculation to build.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
   149
	</body>
19f9d5fc6406 Added really basic failure extraction and BRAG calculation to build.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
   150
	</html>
19f9d5fc6406 Added really basic failure extraction and BRAG calculation to build.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
   151
</xsl:template>
19f9d5fc6406 Added really basic failure extraction and BRAG calculation to build.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
   152
19f9d5fc6406 Added really basic failure extraction and BRAG calculation to build.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
   153
</xsl:stylesheet>
19f9d5fc6406 Added really basic failure extraction and BRAG calculation to build.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
   154