File: Notes.xsl

package info (click to toggle)
dart 0.20020805-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,688 kB
  • ctags: 172
  • sloc: tcl: 4,979; perl: 213; makefile: 61; cpp: 42; sh: 2
file content (69 lines) | stat: -rw-r--r-- 3,723 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
66
67
68
69
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    version="1.0"
    xmlns:lxslt="http://xml.apache.org/xslt"
    xmlns:redirect="org.apache.xalan.lib.Redirect"
    extension-element-prefixes="redirect">

  <!--
       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="Notes">
        <xsl:with-param name="IconDir">../../../../Icons</xsl:with-param>
    </xsl:call-template>
    <xsl:call-template name="Summary"/>
  </xsl:template>

  <xsl:template name="Notes">
    <xsl:param name="IconDir">../../Icons</xsl:param>
      <xsl:call-template name="DashboardHeader">
        <xsl:with-param name="Title">Notes for <xsl:value-of select="NoteCollection/Site/@Name"/> -- <xsl:value-of select="NoteCollection/Site/@BuildName"/></xsl:with-param>
        <xsl:with-param name="IconDir">../../../../Icons</xsl:with-param>
        <xsl:with-param name="DashboardDir" select="$DashboardDir"/>
      </xsl:call-template>
<xsl:if test="count(NoteCollection/Site/BuildNameNotes/Note)">
<h3><xsl:attribute name="style">background: <xsl:value-of select="$LightBlue"/></xsl:attribute>Notes for <xsl:value-of select="NoteCollection/Site/@BuildName"/></h3>
<xsl:for-each select="NoteCollection/Site/BuildNameNotes/Note">
   <p>
   <img><xsl:attribute name="SRC"><xsl:value-of select="$IconDir"/>/Alert.gif</xsl:attribute><xsl:attribute name="ALT">Notes</xsl:attribute><xsl:attribute name="border">0</xsl:attribute><xsl:attribute name="ALIGN">texttop</xsl:attribute></img><xsl:text disable-output-escaping="yes"> &amp;nbsp;&amp;nbsp;</xsl:text>
   <b><xsl:value-of select="DateTime"/></b><br/>
   <xsl:value-of select="Text"/>
   </p>	
</xsl:for-each>
</xsl:if>
<xsl:if test="count(NoteCollection/Site/Notes/Note)">
<h3><xsl:attribute name="style">background: <xsl:value-of select="$LightBlue"/></xsl:attribute>Notes for <xsl:value-of select="NoteCollection/Site/@BuildName"/> -- <xsl:value-of select="NoteCollection/Site/@BuildStamp"/></h3>
<xsl:for-each select="NoteCollection/Site/Notes/Note">
   <p>
   <img><xsl:attribute name="SRC"><xsl:value-of select="$IconDir"/>/Alert.gif</xsl:attribute><xsl:attribute name="ALT">Notes</xsl:attribute><xsl:attribute name="border">0</xsl:attribute><xsl:attribute name="ALIGN">texttop</xsl:attribute></img><xsl:text disable-output-escaping="yes"> &amp;nbsp;&amp;nbsp;</xsl:text>
   <b><xsl:value-of select="DateTime"/></b><br/>
   <xsl:value-of select="Text"/>
   </p>	
</xsl:for-each>
</xsl:if>
<xsl:call-template name="DashboardFooter">
   <xsl:with-param name="IconDir">../../../../Icons</xsl:with-param>
</xsl:call-template>
</xsl:template>

<xsl:template name="Summary">
  <redirect:write select="concat(string('{$TestDocDir}'), '/NotesSummary.xml' )">
    <Notes>
      <SiteName><xsl:value-of select="NoteCollection/Site/@Name"/></SiteName>
      <BuildName><xsl:value-of select="NoteCollection/Site/@BuildName"/></BuildName>
      <BuildStamp><xsl:value-of select="NoteCollection/Site/@BuildStamp"/></BuildStamp>
      <NotesCount><xsl:value-of select="count(NoteCollection/Site/BuildNameNotes/Note) + count(NoteCollection/Site/Notes/Note)"/></NotesCount>
    </Notes>
  </redirect:write>
</xsl:template>


</xsl:stylesheet>