blob: ffc790565e6fe8fbf4ee337001f08c4fd98cd0ae [file] [log] [blame]
david_williams0b74c592007-04-09 06:11:35 +00001<?xml version="1.0" encoding="ISO-8859-1"?>
2<xsl:stylesheet
3 version="1.0"
4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
david_williams0b74c592007-04-09 06:11:35 +00005 <xsl:output
6 method="html"
david_williams15da5c52010-03-17 06:39:11 +00007 indent="yes"/>
8 <xsl:template
9 match="/">
david_williams0b74c592007-04-09 06:11:35 +000010 <html>
11 <body>
david_williams15da5c52010-03-17 06:39:11 +000012 <xsl:apply-templates
13 select="compiler"/>
david_williams0b74c592007-04-09 06:11:35 +000014 </body>
15 </html>
16 </xsl:template>
david_williams15da5c52010-03-17 06:39:11 +000017 <xsl:template
18 match="compiler">
david_williams0b74c592007-04-09 06:11:35 +000019 <h2>Compiler Report</h2>
20 <p>
21 Compiler:
david_williams15da5c52010-03-17 06:39:11 +000022 <xsl:value-of
23 select="@name"/>
david_williams403beae2007-12-09 02:10:40 +000024 <xsl:text> </xsl:text>
25 Version:
david_williams15da5c52010-03-17 06:39:11 +000026 <xsl:value-of
27 select="@version"/>
david_williams0b74c592007-04-09 06:11:35 +000028 </p>
david_williams15da5c52010-03-17 06:39:11 +000029 <xsl:apply-templates
30 select="stats"/>
31 <xsl:apply-templates
32 select="sources"/>
david_williams0b74c592007-04-09 06:11:35 +000033 </xsl:template>
david_williams0b74c592007-04-09 06:11:35 +000034 <xsl:template
35 name="stats"
36 match="stats">
david_williams403beae2007-12-09 02:10:40 +000037 <p>
38 Number of source files:
david_williams15da5c52010-03-17 06:39:11 +000039 <xsl:value-of
40 select="count(..//source)"/>
david_williams403beae2007-12-09 02:10:40 +000041 Number of classfiles:
david_williams15da5c52010-03-17 06:39:11 +000042 <xsl:value-of
43 select="number_of_classfiles/@value"/>
david_williams0b74c592007-04-09 06:11:35 +000044 </p>
45 <p>
david_williams403beae2007-12-09 02:10:40 +000046 Problems:
david_williams15da5c52010-03-17 06:39:11 +000047 <xsl:value-of
48 select="problem_summary/@problems"/>
david_williams403beae2007-12-09 02:10:40 +000049 (Errors:
david_williams15da5c52010-03-17 06:39:11 +000050 <xsl:value-of
51 select="problem_summary/@errors"/>
david_williams403beae2007-12-09 02:10:40 +000052 Warnings:
david_williams15da5c52010-03-17 06:39:11 +000053 <xsl:value-of
54 select="problem_summary/@warnings"/>
david_williams403beae2007-12-09 02:10:40 +000055 )
david_williams0b74c592007-04-09 06:11:35 +000056 </p>
57 </xsl:template>
david_williams0b74c592007-04-09 06:11:35 +000058 <xsl:template
59 name="sources"
60 match="sources">
david_williams15da5c52010-03-17 06:39:11 +000061 <xsl:if
62 test="count(source) > 0">
david_williams0b74c592007-04-09 06:11:35 +000063 <dl>
david_williams15da5c52010-03-17 06:39:11 +000064 <xsl:for-each
65 select="source">
david_williams0b74c592007-04-09 06:11:35 +000066 <xsl:variable
67 name="package"
68 select="normalize-space(@package)">
69 </xsl:variable>
70 <xsl:variable
71 name="path"
72 select="normalize-space(@path)">
73 </xsl:variable>
74 <xsl:variable
75 name="classname"
76 select="substring-after($path, $package)">
77 </xsl:variable>
david_williams15da5c52010-03-17 06:39:11 +000078 <xsl:if
79 test="count(problems) > 0">
80 <dt
81 style="font-weight: bold; color: black">
david_williams0b74c592007-04-09 06:11:35 +000082 Source File:
david_williams15da5c52010-03-17 06:39:11 +000083 <xsl:value-of
84 select="$package"/>
85 <xsl:value-of
86 select="$classname"/>
david_williams0b74c592007-04-09 06:11:35 +000087 </dt>
david_williams15da5c52010-03-17 06:39:11 +000088 <xsl:apply-templates
89 select="problems">
90 <xsl:with-param
91 name="classname">
92 <xsl:value-of
93 select="$classname"/>
david_williams403beae2007-12-09 02:10:40 +000094 </xsl:with-param>
david_williams0b74c592007-04-09 06:11:35 +000095 </xsl:apply-templates>
96 </xsl:if>
97 </xsl:for-each>
98 </dl>
david_williams0b74c592007-04-09 06:11:35 +000099 </xsl:if>
david_williams0b74c592007-04-09 06:11:35 +0000100 </xsl:template>
david_williams15da5c52010-03-17 06:39:11 +0000101 <xsl:template
102 match="problems">
103 <xsl:param
104 name="classname"/>
105 <xsl:for-each
106 select="problem">
107 <dd
108 style="font-weight: normal; color: black">
109 <xsl:value-of
110 select="position()"/>
david_williams0b74c592007-04-09 06:11:35 +0000111 <xsl:text>. </xsl:text>
david_williams15da5c52010-03-17 06:39:11 +0000112 <xsl:value-of
113 select="@severity"/>
david_williams0b74c592007-04-09 06:11:35 +0000114 <xsl:text>: </xsl:text>
david_williams15da5c52010-03-17 06:39:11 +0000115 <xsl:value-of
116 select="@id"/>
david_williams0b74c592007-04-09 06:11:35 +0000117 <xsl:variable
david_williams403beae2007-12-09 02:10:40 +0000118 name="lineNumber"
119 select="@line">
david_williams0b74c592007-04-09 06:11:35 +0000120 </xsl:variable>
david_williams15da5c52010-03-17 06:39:11 +0000121 <xsl:for-each
122 select="message">
david_williams403beae2007-12-09 02:10:40 +0000123 <p
124 style="margin-left: +.5in; font-size: -1; margin-top: 0;margin-bottom:0;">
david_williams0b74c592007-04-09 06:11:35 +0000125 <small>
david_williams15da5c52010-03-17 06:39:11 +0000126 <xsl:value-of
127 select="@value"/>
david_williams0b74c592007-04-09 06:11:35 +0000128 </small>
129 </p>
130 </xsl:for-each>
david_williams15da5c52010-03-17 06:39:11 +0000131 <xsl:for-each
132 select="source_context">
david_williams0b74c592007-04-09 06:11:35 +0000133 <xsl:variable
134 name="pre"
135 select="substring(@value,0,(@sourceStart + 1))">
136 </xsl:variable>
137 <xsl:variable
138 name="main"
139 select="substring(@value,(@sourceStart + 1),(((@sourceEnd + 1) - (@sourceStart + 1)) + 1))">
140 </xsl:variable>
141 <xsl:variable
142 name="end"
143 select="substring(@value,(@sourceEnd + 2))">
144 </xsl:variable>
david_williams403beae2007-12-09 02:10:40 +0000145 <p
146 style="margin-left: +.5in; font-size: -2; margin-top: 0;margin-bottom:0;">
david_williams15da5c52010-03-17 06:39:11 +0000147 <xsl:value-of
148 select="substring($classname,2)"/>
david_williams403beae2007-12-09 02:10:40 +0000149 :
david_williams0b74c592007-04-09 06:11:35 +0000150 </p>
david_williams403beae2007-12-09 02:10:40 +0000151 <p
152 style="margin-left: +.5in; font-size: -2;font-family: monospace; margin-top: 0;margin-bottom:0;">
david_williams15da5c52010-03-17 06:39:11 +0000153 <xsl:value-of
154 select="$lineNumber"/>
david_williams403beae2007-12-09 02:10:40 +0000155 :
david_williams15da5c52010-03-17 06:39:11 +0000156 <xsl:value-of
157 select="$pre"/>
david_williams403beae2007-12-09 02:10:40 +0000158 <b>
159 <u>
david_williams15da5c52010-03-17 06:39:11 +0000160 <xsl:value-of
161 select="$main"/>
david_williams403beae2007-12-09 02:10:40 +0000162 </u>
163 </b>
david_williams15da5c52010-03-17 06:39:11 +0000164 <xsl:value-of
165 select="$end"/>
david_williams0b74c592007-04-09 06:11:35 +0000166 </p>
167 </xsl:for-each>
168 </dd>
169 </xsl:for-each>
david_williams0b74c592007-04-09 06:11:35 +0000170 </xsl:template>
david_williams0b74c592007-04-09 06:11:35 +0000171</xsl:stylesheet>