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 70 71 72 73 74 75 76
|
<?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="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"> &nbsp;&nbsp;</xsl:text>
<b><xsl:value-of select="DateTime"/></b>
<xsl:if test="count(@Name)">
<b> -- <xsl:value-of select="@Name"/></b>
</xsl:if>
<br/>
<pre><xsl:value-of select="Text"/></pre>
</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"> &nbsp;&nbsp;</xsl:text>
<b><xsl:value-of select="DateTime"/></b>
<xsl:if test="count(@Name)">
<b> -- <xsl:value-of select="@Name"/></b>
</xsl:if>
<br/>
<pre><xsl:value-of select="Text"/></pre>
</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">
<xsl:variable name="uri" select="concat('file:///', $TestDocDir, '/NotesSummary.xml' )"/>
<xsl:result-document href="{$uri}" >
<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>
</xsl:result-document>
</xsl:template>
</xsl:stylesheet>
|