File: Configure.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 (59 lines) | stat: -rw-r--r-- 2,720 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
<?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="DashboardStamp" select="string('MostRecentResults-Nightly')"/>
  <xsl:variable name="DashboardDir" select="concat('../../../../Dashboard/', $DashboardStamp)"/>
  <xsl:param name="TestDocDir">.</xsl:param>
  <xsl:preserve-space elements="xsl:text"/>
  <xsl:include href="DashboardConfig.xsl"/>
  <xsl:output method="html"/>
  <xsl:template match="/">
    <xsl:call-template name="Summary"/>
    <xsl:apply-templates select="Site"/>
  </xsl:template>

  <xsl:template match="Site">
      <xsl:call-template name="DashboardHeader">
        <xsl:with-param name="Title">Configure Output <xsl:value-of select="@Name"/> -- <xsl:value-of select="@BuildName"/></xsl:with-param>
        <xsl:with-param name="IconDir">../../../../Icons</xsl:with-param>
        <xsl:with-param name="DashboardDir" select="$DashboardDir"/>
      </xsl:call-template>
     <p><b><xsl:text>Site:</xsl:text></b><xsl:value-of select="@Name"/></p><p>
<b><xsl:text>Build Name:</xsl:text></b><xsl:value-of select="@BuildName"/></p>
     <xsl:apply-templates select="Configure"/>
      <xsl:call-template name="DashboardFooter">
    <xsl:with-param name="IconDir">../../../../Icons</xsl:with-param>
      </xsl:call-template>
  </xsl:template>


  <xsl:template match="Configure">
    <p><b>Configure Command:</b><tt><xsl:value-of select="ConfigureCommand"/></tt></p>
    <p><b>Configure Return Value:</b><xsl:value-of select="ConfigureStatus"/> </p>
    <p><b>Configure Output:</b></p>
    <pre><xsl:value-of select="Log"/></pre>
  </xsl:template>


  <xsl:template name="Summary">
    <xsl:variable name="uri" select="concat('file:///', $TestDocDir, '/ConfigureSummary.xml' )" />
    <xsl:result-document href="{$uri}" >
      <Configure>
        <SiteName><xsl:value-of select="Site/@Name"/></SiteName>
        <BuildName><xsl:value-of select="Site/@BuildName"/></BuildName>
        <BuildStamp><xsl:value-of select="Site/@BuildStamp"/></BuildStamp>
        <StartDateTime><xsl:value-of select="Site/Configure/StartDateTime"/></StartDateTime>
        <xsl:if test="count(Site/Configure/ConfigureStatus)">
          <ConfigureStatus><xsl:value-of select="Site/Configure/ConfigureStatus"/></ConfigureStatus>
        </xsl:if>
        <EndDateTime><xsl:value-of select="Site/Build/EndDateTime"/></EndDateTime>
      </Configure>
    </xsl:result-document>
  </xsl:template>
</xsl:stylesheet>