Debian Codegraph @

Web/ctests/Build.xsl

raw
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 version="2.0"
4 xmlns:lxslt="http://xml.apache.org/xslt">
5
6 <!--
7 Use DashboardStamp as a parameter, default to most recent
8 The proper flags to Xalan are in the form -PARAM DashboardStamp "string('foo')"
9 -->
10 <xsl:param name="DashboardStamp" select="string('MostRecentResults-Nightly')"/>
11 <xsl:variable name="DashboardDir" select="concat('../../../../Dashboard/', $DashboardStamp)"/>
12 <xsl:param name="TestDocDir">.</xsl:param>
13 <xsl:preserve-space elements="xsl:text"/>
14 <xsl:include href="DashboardConfig.xsl"/>
15 <xsl:output method="html"/>
16 <xsl:template match="/">
17 Build.html is deliberately empty. Separate BuildError.html and BuildWarning.html files are generated.
18 <xsl:call-template name="Summary"/>
19 <xsl:call-template name="ErrorLog"/>
20 <xsl:call-template name="WarningLog"/>
21 </xsl:template>
22
23 <xsl:template name="ErrorLog">
24 <xsl:variable name="ErrorLogURI" select="concat('file:///', $TestDocDir, '/BuildError.html' )"/>
25 <xsl:result-document href="{$ErrorLogURI}" >
26 <xsl:call-template name="DashboardHeader">
27 <xsl:with-param name="Title">Build Errors <xsl:value-of select="Site/@Name"/> -- <xsl:value-of select="Site/@BuildName"/></xsl:with-param>
28 <xsl:with-param name="IconDir">../../../../Icons</xsl:with-param>
29 <xsl:with-param name="DashboardDir" select="$DashboardDir"/>
30 </xsl:call-template>
31 <p><b><xsl:text>Site:</xsl:text></b><xsl:value-of select="Site/@Name"/></p><p>
32 <b><xsl:text>Build Name:</xsl:text></b><xsl:value-of select="Site/@BuildName"/></p>
33 Found <xsl:value-of select="count(Site/Build/Error)"/> Errors<br/>
34 <p><a href="BuildWarning.html">Warnings</a> are here.</p>
35 <xsl:for-each select="Site/Build/Error">
36 <xsl:call-template name="FormatContext"/>
37 </xsl:for-each>
38 <xsl:call-template name="DashboardFooter">
39 <xsl:with-param name="IconDir">../../../../Icons</xsl:with-param>
40 </xsl:call-template>
41 </xsl:result-document>
42 </xsl:template>
43
44 <xsl:template name="WarningLog">
45 <xsl:variable name="WarningLogURI" select="concat('file:///', $TestDocDir, '/BuildWarning.html' )"/>
46 <xsl:result-document href="{$WarningLogURI}" >
47 <xsl:call-template name="DashboardHeader">
48 <xsl:with-param name="Title">Build Warnings <xsl:value-of select="Site/@Name"/> -- <xsl:value-of select="Site/@BuildName"/></xsl:with-param>
49 <xsl:with-param name="IconDir">../../../../Icons</xsl:with-param>
50 <xsl:with-param name="DashboardDir" select="$DashboardDir"/>
51 </xsl:call-template>
52 <p><b><xsl:text>Site:</xsl:text></b><xsl:value-of select="Site/@Name"/></p><p>
53 <b><xsl:text>Build Name:</xsl:text></b><xsl:value-of select="Site/@BuildName"/></p>
54 Found <xsl:value-of select="count(Site/Build/Warning)"/> Warnings<br/>
55 <p><a href="BuildError.html">Errors</a> are here.</p>
56 <xsl:for-each select="Site/Build/Warning">
57 <xsl:call-template name="FormatContext"/>
58 </xsl:for-each>
59 <xsl:call-template name="DashboardFooter">
60 <xsl:with-param name="IconDir">../../../../Icons</xsl:with-param>
61 </xsl:call-template>
62 </xsl:result-document>
63 </xsl:template>
64
65 <xsl:template name="FormatContext">
66 <hr/>
67 <h3>
68 <A>
69 <xsl:attribute name="Name"><xsl:value-of select="BuildLogLine"/></xsl:attribute>
70 Build Log line <xsl:value-of select="BuildLogLine"/>
71 </A>
72 </h3>
73
74 <br/>
75 <xsl:choose>
76 <xsl:when test="SourceFile != ''">
77 File:
78 <b>
79 <xsl:value-of select="SourceFile"/>
80 </b>
81 Line:
82 <b>
83 <xsl:value-of select="SourceLineNumber"/>
84 </b>
85 <xsl:if test="$CVSWebURL!=''">
86 <a><xsl:attribute name="href"><xsl:value-of select="$CVSWebURL"/><xsl:value-of select="SourceFile"/><xsl:choose><xsl:when test="$CVSROOT!=''">?cvsroot=<xsl:value-of select="$CVSROOT"/>&amp;annotate=HEAD</xsl:when><xsl:otherwise>?annotate=HEAD</xsl:otherwise></xsl:choose>#<xsl:value-of select="SourceLineNumber"/></xsl:attribute>CVS</a>
87 </xsl:if>
88 <xsl:if test="Url !=''">
89 <p><a><xsl:attribute name="href"><xsl:value-of select="Url"/></xsl:attribute>
90 <xsl:choose><xsl:when test="UrlName !=''"><xsl:value-of select="UrlName"/></xsl:when><xsl:otherwise>
91 <xsl:value-of select="Url"/></xsl:otherwise></xsl:choose>
92 </a></p>
93 </xsl:if>
94 <xsl:if test="$UseDoxygen='ON'">
95 <xsl:if test="SourceFileTail != ''">
96 <xsl:text> and </xsl:text>
97 <a>
98 <xsl:attribute name="href"><xsl:value-of select="$DoxygenURL"/><xsl:value-of select="translate ( SourceFileTail, '.', '_' )"/>-source.html</xsl:attribute>
99 Doxygen
100 </a><xsl:text> access </xsl:text>
101 </xsl:if>
102 </xsl:if>
103 </xsl:when>
104 </xsl:choose>
105 <pre><xsl:value-of select="PreContext"/><b><xsl:value-of select="Text"/></b>
106 <xsl:value-of select="PostContext"/></pre>
107 <xsl:if test="RepeatCount != '0'">
108 This error was repeated another <xsl:value-of select="RepeatCount"/> times.
109 </xsl:if>
110 </xsl:template>
111
112
113 <xsl:template name="Summary">
114 <xsl:variable name="uri" select="concat('file:///', $TestDocDir, '/BuildSummary.xml' )" />
115 <xsl:result-document href="{$uri}" >
116 <Build>
117 <SiteName><xsl:value-of select="Site/@Name"/></SiteName>
118 <BuildName><xsl:value-of select="Site/@BuildName"/></BuildName>
119 <BuildStamp><xsl:value-of select="Site/@BuildStamp"/></BuildStamp>
120 <StartDateTime><xsl:value-of select="Site/Build/StartDateTime"/></StartDateTime>
121
122 <WarningCount><xsl:value-of select="count(Site/Build/Warning)"/></WarningCount>
123 <ErrorCount><xsl:value-of select="count(Site/Build/Error)"/></ErrorCount>
124 <EndDateTime><xsl:value-of select="Site/Build/EndDateTime"/></EndDateTime>
125 <ElapsedMinutes><xsl:value-of select="Site/Build/ElapsedMinutes"/></ElapsedMinutes>
126 <Generator><xsl:value-of select="Site/@Generator"/></Generator>
127 <Files>
128 <xsl:for-each select="Site/Build/Error">
129 <xsl:if test="SourceFile">
130 <File Type='Error'>
131 <Name><xsl:value-of select="SourceFile"/></Name>
132 <SourceLineNumber><xsl:value-of select="SourceLineNumber"/></SourceLineNumber>
133 <Text><xsl:value-of select="Text"/></Text>
134 <BuildLogLine><xsl:value-of select="BuildLogLine"/></BuildLogLine>
135 </File>
136 </xsl:if>
137 </xsl:for-each>
138 <xsl:for-each select="Site/Build/Warning">
139 <xsl:if test="SourceFile">
140 <File Type='Warning'>
141 <Name><xsl:value-of select="SourceFile"/></Name>
142 <SourceLineNumber><xsl:value-of select="SourceLineNumber"/></SourceLineNumber>
143 <Text><xsl:value-of select="Text"/></Text>
144 <BuildLogLine><xsl:value-of select="BuildLogLine"/></BuildLogLine>
145 </File>
146 </xsl:if>
147 </xsl:for-each>
148 </Files>
149 </Build>
150 </xsl:result-document>
151 </xsl:template>
152 </xsl:stylesheet>