File: CoverageLog.xsl

package info (click to toggle)
dart 0.20061109-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 5,668 kB
  • ctags: 247
  • sloc: tcl: 5,652; perl: 256; python: 141; cpp: 79; makefile: 68; sh: 36
file content (65 lines) | stat: -rw-r--r-- 2,697 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    version="2.0"
    xmlns:lxslt="http://xml.apache.org/xslt">

  <!--
       Use DashboardStamp as a parameter, default to most recent
       The proper flags to Xalan are in the form -PARAM DashboardStamp "string('foo')"
       -->
 <xsl:param name="DashboardPath"/> 
 <xsl:param name="DashboardStamp" select="string('MostRecentResults-Nightly')"/>
 <xsl:param name="TestDocDir">.</xsl:param>
 <xsl:variable name="DashboardDir" select="concat('../../../../Dashboard/', $DashboardStamp)"/>
 <xsl:variable name="IconDir">../../../../Icons</xsl:variable>
 <xsl:include href="DashboardConfig.xsl"/>
 <xsl:output method="html"/>

  <xsl:template match="/">
    <xsl:for-each select="Site/CoverageLog/File">
    
      <xsl:variable name="uri" select="concat('file:///', $TestDocDir, '/../Coverage/', translate ( @FullPath, '/.', '__' ), '.html' )" />
    <xsl:result-document href="{$uri}">
      <xsl:call-template name="DashboardHeader">
        <xsl:with-param name="Title">Annotated Coverage for <xsl:value-of select="@Name"/></xsl:with-param>
        <xsl:with-param name="IconDir">../../../../Icons</xsl:with-param>
        <xsl:with-param name="DashboardDir" select="$DashboardDir"/>
      </xsl:call-template>
        <b>Site Name: </b> <xsl:value-of select="/Site/@Name"/>
      <p>
        <b>Build Name: </b> <xsl:value-of select="/Site/@BuildName"/>
      </p>
      <p>
        <b>Coverage Date: </b> <xsl:value-of select="/Site/CoverageLog/StartDateTime"/>
      </p>

      <hr/>
      <pre>
        <xsl:for-each select="Report/Line">
          <xsl:sort select="@Number" data-type="number"/>
          <xsl:choose>
            <xsl:when test="@Count &lt; 0">
              <xsl:text disable-output-escaping="yes"><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]]></xsl:text>
            </xsl:when>
            <xsl:when test="@Count = 0">
              <xsl:text disable-output-escaping="yes"><![CDATA[########]]></xsl:text>
            </xsl:when>
            <xsl:otherwise>
              <xsl:value-of select="format-number ( @Count, '00000000' )"/>
            </xsl:otherwise>
          </xsl:choose>

          <xsl:text disable-output-escaping="yes"><![CDATA[&nbsp;&nbsp;]]></xsl:text>
          <xsl:value-of select="."/>
        <xsl:text disable-output-escaping="yes">
</xsl:text>
        </xsl:for-each>
      </pre>
      <xsl:call-template name="DashboardFooter">
	<xsl:with-param name="IconDir">../../../../Icons</xsl:with-param>
      </xsl:call-template>
    </xsl:result-document> 
    </xsl:for-each>
  </xsl:template>

</xsl:stylesheet>