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 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200
|
<?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('../', $DashboardStamp)"/>
<xsl:param name="TestDocDir">.</xsl:param>
<xsl:include href="DashboardConfig.xsl" />
<xsl:output method="html"/>
<xsl:template match="/Update">
<xsl:call-template name="Summary"/>
<xsl:choose>
<xsl:when test="@mode='Client'">
<xsl:call-template name="DashboardHeader">
<xsl:with-param name="Title">Files changed <xsl:value-of select="Site"/> -- <xsl:value-of select="BuildName"/> as of <xsl:value-of select="StartDateTime"/></xsl:with-param>
<xsl:with-param name="IconDir">../../../../Icons</xsl:with-param>
<xsl:with-param name="DashboardDir" select="concat('../../../../Dashboard/', $DashboardStamp)"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="@mode='Server'">
<xsl:call-template name="DashboardHeader">
<xsl:with-param name="Title">Changes</xsl:with-param>
<xsl:with-param name="IconDir">../../Icons</xsl:with-param>
<xsl:with-param name="DashboardDir" select="$DashboardDir"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="DashboardHeader">
<xsl:with-param name="Title">Changes</xsl:with-param>
<xsl:with-param name="IconDir">../../Icons</xsl:with-param>
<xsl:with-param name="DashboardDir" select="$DashboardDir"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="@mode='Client'">
<h3>Files changed <xsl:value-of select="Site"/> -- <xsl:value-of select="BuildName"/> as of <xsl:value-of select="StartDateTime"/></h3>
<xsl:call-template name="JavaScriptHeader">
<xsl:with-param name="IconDir">../../../../Icons</xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:when test="@mode='Server'">
<h3>Changed files as of <xsl:value-of select="StartDateTime"/></h3>
<xsl:call-template name="JavaScriptHeader">
<xsl:with-param name="IconDir">../../Icons</xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<h3>Changed files as of <xsl:value-of select="StartDateTime"/></h3>
<xsl:call-template name="JavaScriptHeader">
<xsl:with-param name="IconDir">../../Icons</xsl:with-param>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="not(UpdateReturnStatus='')">
<h3 class="nr">Update status: <xsl:value-of select="UpdateReturnStatus"/></h3>
</xsl:if>
[<a href="javascript:reload()" onMouseOver="window.parent.status='Expand all';return true;" onClick="explode()">Expand all</a>
<xsl:text disable-output-escaping="yes"><![CDATA[ | ]]></xsl:text><a href="javascript:reload()" onMouseOver="window.parent.status='Collapse all';return true;" onClick="contract()">Collapse all</a>]
<p></p>
<script LANGUAGE="JavaScript">
dbAdd (true, "Updated files (<xsl:value-of select="count(/Update/Directory/Updated)"/>)", "", 0, "", "1", "", "", "")
<xsl:for-each select="Directory">
<xsl:sort select="Name"/>
<xsl:if test="count(Updated)">
dbAdd (true, "<b><xsl:value-of select="Name"/> (<xsl:value-of select="count(Updated)"/>)</b>", "", 1, "", "1", "", "", "")
<xsl:for-each select="Updated">
<xsl:sort select="Name"/>
<xsl:call-template name="dbAdd">
<xsl:with-param name="Level">2</xsl:with-param>
</xsl:call-template>
</xsl:for-each>
</xsl:if>
</xsl:for-each>
dbAdd (true, "Modified files (<xsl:value-of select="count(/Update/Directory/Modified)"/>)", "", 0, "", "1", "", "", "")
<xsl:for-each select="Directory">
<xsl:sort select="Name"/>
<xsl:if test="count(Modified)">
dbAdd (true, "<b><xsl:value-of select="Name"/> (<xsl:value-of select="count(Modified)"/>)</b>", "", 1, "", "1", "", "", "")
<xsl:for-each select="Modified">
<xsl:sort select="Name"/>
<xsl:call-template name="dbAdd">
<xsl:with-param name="Level">2</xsl:with-param>
</xsl:call-template>
</xsl:for-each>
</xsl:if>
</xsl:for-each>
dbAdd (true, "Conflicting files (<xsl:value-of select="count(/Update/Directory/Conflicting)"/>)", "", 0, "", "1", "", "", "")
<xsl:for-each select="Directory">
<xsl:sort select="Name"/>
<xsl:if test="count(Conflicting)">
dbAdd (true, "<b><xsl:value-of select="Name"/> (<xsl:value-of select="count(Conflicting)"/>)</b>", "", 1, "", "1", "", "", "")
<xsl:for-each select="Conflicting">
<xsl:sort select="Name"/>
<xsl:call-template name="dbAdd">
<xsl:with-param name="Level">2</xsl:with-param>
</xsl:call-template>
</xsl:for-each>
</xsl:if>
</xsl:for-each>
</script>
<xsl:call-template name="JavaScriptFooter"/>
[<a href="javascript:reload()" onMouseOver="window.parent.status='Expand all';return true;" onClick="explode()">Expand all</a>
<xsl:text disable-output-escaping="yes"><![CDATA[ | ]]></xsl:text><a href="javascript:reload()" onMouseOver="window.parent.status='Collapse all';return true;" onClick="contract()">Collapse all</a>]
<br/><br/>
<xsl:choose>
<xsl:when test="@mode='Client'">
<xsl:call-template name="DashboardFooter">
<xsl:with-param name="IconDir">../../../../Icons</xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:when test="@mode='Server'">
<xsl:call-template name="DashboardFooter">
<xsl:with-param name="IconDir">../../Icons</xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="DashboardFooter">
<xsl:with-param name="IconDir">../../Icons</xsl:with-param>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="dbAdd">
<xsl:param name="Level">1</xsl:param>
<xsl:variable name="Level2"><xsl:value-of select="$Level + 1"/></xsl:variable>
<xsl:choose>
<xsl:when test="PriorRevision = Revision">
<xsl:choose>
<xsl:when test="$CVSWebURL!='' and $CVSROOT!=''">
dbAdd (false, "<xsl:value-of select="File"/> Rev: <xsl:value-of select="Revision"/> ", "<xsl:value-of select="$CVSWebURL"/><xsl:value-of select="FullName"/>?cvsroot=<xsl:value-of select="$CVSROOT"/>&rev=<xsl:value-of select="Revision"/>&content-type=text/x-cvsweb-markup", <xsl:value-of select="$Level"/>, "", "1", "<xsl:value-of select="Author"/>", "<xsl:value-of select="Email"/>", "<xsl:value-of select="translate ( normalize-space ( Log ), '"', ' ' )"/>")
</xsl:when>
<xsl:when test="$CVSWebURL!=''">
dbAdd (false, "<xsl:value-of select="File"/> Rev: <xsl:value-of select="Revision"/> ", "<xsl:value-of select="$CVSWebURL"/><xsl:value-of select="FullName"/>?rev=<xsl:value-of select="Revision"/>&content-type=text/x-cvsweb-markup", <xsl:value-of select="$Level"/>, "", "1", "<xsl:value-of select="Author"/>", "<xsl:value-of select="Email"/>", "<xsl:value-of select="translate ( normalize-space ( Log ), '"', ' ' )"/>")
</xsl:when>
<xsl:otherwise>
dbAdd (false, "<xsl:value-of select="File"/> Rev: <xsl:value-of select="Revision"/> ", "", <xsl:value-of select="$Level"/>, "", "1", "<xsl:value-of select="Author"/>", "<xsl:value-of select="Email"/>", "<xsl:value-of select="translate ( normalize-space ( Log ), '"', ' ' )"/>")
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$CVSWebURL!='' and $CVSROOT!=''">
dbAdd (false, "<xsl:value-of select="File"/> Rev: <xsl:value-of select="Revision"/> ", "<xsl:value-of select="$CVSWebURL"/><xsl:value-of select="FullName"/>.diff?cvsroot=<xsl:value-of select="$CVSROOT"/>&r1=<xsl:value-of select="PriorRevision"/>&r2=<xsl:value-of select="Revision"/>", <xsl:value-of select="$Level"/>, "", "1", "<xsl:value-of select="Author"/>", "<xsl:value-of select="Email"/>", "<xsl:value-of select="translate ( normalize-space ( Log ), '"', ' ' )"/>")
</xsl:when>
<xsl:when test="$CVSWebURL!=''">
dbAdd (false, "<xsl:value-of select="File"/> Rev: <xsl:value-of select="Revision"/> ", "<xsl:value-of select="$CVSWebURL"/><xsl:value-of select="FullName"/>.diff?r1=<xsl:value-of select="PriorRevision"/>&r2=<xsl:value-of select="Revision"/>", <xsl:value-of select="$Level"/>, "", "1", "<xsl:value-of select="Author"/>", "<xsl:value-of select="Email"/>", "<xsl:value-of select="translate ( normalize-space ( Log ), '"', ' ' )"/>")
</xsl:when>
<xsl:otherwise>
dbAdd (false, "<xsl:value-of select="File"/> Rev: <xsl:value-of select="Revision"/> ", "", <xsl:value-of select="$Level"/>, "", "1", "<xsl:value-of select="Author"/>", "<xsl:value-of select="Email"/>", "<xsl:value-of select="translate ( normalize-space ( Log ), '"', ' ' )"/>")
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="Summary">
<xsl:variable name="uri" select="concat('file:///', $TestDocDir, '/UpdateSummary.xml' )"/>
<xsl:result-document href="{$uri}" >
<xsl:text disable-output-escaping="yes"><?xml version="1.0" encoding="ISO-8859-1"?>
</xsl:text>
<Update><xsl:attribute name="mode"><xsl:value-of select="@mode"/></xsl:attribute>
<xsl:if test="@mode='Client'">
<SiteName><xsl:value-of select="Site"/></SiteName>
<xsl:copy-of select="BuildName"/>
<xsl:copy-of select="BuildStamp"/>
</xsl:if>
<StartDateTime><xsl:value-of select="StartDateTime"/></StartDateTime>
<UpdateReturnStatus><xsl:value-of select="UpdateReturnStatus"/></UpdateReturnStatus>
<ChangedFileCount><xsl:value-of select="count(Directory/Updated|Directory/Modified|Directory/Conflicting)"/></ChangedFileCount>
<AuthorCount><xsl:value-of select="count(Author)"/></AuthorCount>
<AuthorList>
<xsl:for-each select="Author">
<Author><xsl:value-of select="Name"/></Author>
</xsl:for-each>
</AuthorList>
<DirectoryCount><xsl:value-of select="count(Directory)"/></DirectoryCount>
</Update>
</xsl:result-document>
</xsl:template>
</xsl:stylesheet>
|