|
1 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> |
|
2 |
|
3 <!-- |
|
4 Copyright 2002,2004 The Apache Software Foundation |
|
5 |
|
6 Licensed under the Apache License, Version 2.0 (the "License"); |
|
7 you may not use this file except in compliance with the License. |
|
8 You may obtain a copy of the License at |
|
9 |
|
10 http://www.apache.org/licenses/LICENSE-2.0 |
|
11 |
|
12 Unless required by applicable law or agreed to in writing, software |
|
13 distributed under the License is distributed on an "AS IS" BASIS, |
|
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
15 See the License for the specific language governing permissions and |
|
16 limitations under the License. |
|
17 |
|
18 --> |
|
19 |
|
20 <xsl:output method="html" indent="yes" encoding="US-ASCII"/> |
|
21 |
|
22 <xsl:template match="JDepend"> |
|
23 <html> |
|
24 <head> |
|
25 <title>JDepend Analysis</title> |
|
26 |
|
27 <style type="text/css"> |
|
28 body { |
|
29 font:normal 68% verdana,arial,helvetica; |
|
30 color:#000000; |
|
31 } |
|
32 table tr td, tr th { |
|
33 font-size: 68%; |
|
34 } |
|
35 table.details tr th{ |
|
36 font-weight: bold; |
|
37 text-align:left; |
|
38 background:#a6caf0; |
|
39 } |
|
40 table.details tr td{ |
|
41 background:#eeeee0; |
|
42 } |
|
43 |
|
44 p { |
|
45 line-height:1.5em; |
|
46 margin-top:0.5em; margin-bottom:1.0em; |
|
47 margin-left:2em; |
|
48 margin-right:2em; |
|
49 } |
|
50 h1 { |
|
51 margin: 0px 0px 5px; font: 165% verdana,arial,helvetica |
|
52 } |
|
53 h2 { |
|
54 margin-top: 1em; margin-bottom: 0.5em; font: bold 125% verdana,arial,helvetica |
|
55 } |
|
56 h3 { |
|
57 margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica |
|
58 } |
|
59 h4 { |
|
60 margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica |
|
61 } |
|
62 h5 { |
|
63 margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica |
|
64 } |
|
65 h6 { |
|
66 margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica |
|
67 } |
|
68 .Error { |
|
69 font-weight:bold; color:red; |
|
70 } |
|
71 .Failure { |
|
72 font-weight:bold; color:purple; |
|
73 } |
|
74 .Properties { |
|
75 text-align:right; |
|
76 } |
|
77 </style> |
|
78 |
|
79 |
|
80 </head> |
|
81 <body> |
|
82 <!--h1>JDepend Report</h1> |
|
83 <ul> |
|
84 <xsl:for-each select="./Packages/Package"> |
|
85 <xsl:sort select="@name"/> |
|
86 <li><xsl:value-of select="@name"/></li> |
|
87 </xsl:for-each> |
|
88 </ul--> |
|
89 |
|
90 <h1><a name="top">JDepend Analysis</a></h1> |
|
91 <p align="right">Designed for use with <a href="http://www.clarkware.com/software/JDepend.html">JDepend</a> and <a href="http://jakarta.apache.org">Ant</a>.</p> |
|
92 <hr size="2" /> |
|
93 |
|
94 <table width="100%"><tr><td> |
|
95 <a name="NVsummary"><h2>Summary</h2></a> |
|
96 </td><td align="right"> |
|
97 [<a href="#NVsummary">summary</a>] |
|
98 [<a href="#NVpackages">packages</a>] |
|
99 [<a href="#NVcycles">cycles</a>] |
|
100 [<a href="#NVexplanations">explanations</a>] |
|
101 </td></tr></table> |
|
102 |
|
103 <table width="100%" class="details"> |
|
104 <tr> |
|
105 <th>Package</th> |
|
106 <th>Total Classes</th> |
|
107 <th><a href="#EXnumber">Abstract Classes</a></th> |
|
108 <th><a href="#EXnumber">Concrete Classes</a></th> |
|
109 <th><a href="#EXafferent">Afferent Couplings</a></th> |
|
110 <th><a href="#EXefferent">Efferent Couplings</a></th> |
|
111 <th><a href="#EXabstractness">Abstractness</a></th> |
|
112 <th><a href="#EXinstability">Instability</a></th> |
|
113 <th><a href="#EXdistance">Distance</a></th> |
|
114 |
|
115 </tr> |
|
116 <xsl:for-each select="./Packages/Package"> |
|
117 <xsl:if test="count(error) = 0"> |
|
118 <tr> |
|
119 <td align="left"> |
|
120 <a> |
|
121 <xsl:attribute name="href">#PK<xsl:value-of select="@name"/> |
|
122 </xsl:attribute> |
|
123 <xsl:value-of select="@name"/> |
|
124 </a> |
|
125 </td> |
|
126 <td align="right"><xsl:value-of select="Stats/TotalClasses"/></td> |
|
127 <td align="right"><xsl:value-of select="Stats/AbstractClasses"/></td> |
|
128 <td align="right"><xsl:value-of select="Stats/ConcreteClasses"/></td> |
|
129 <td align="right"><xsl:value-of select="Stats/Ca"/></td> |
|
130 <td align="right"><xsl:value-of select="Stats/Ce"/></td> |
|
131 <td align="right"><xsl:value-of select="Stats/A"/></td> |
|
132 <td align="right"><xsl:value-of select="Stats/I"/></td> |
|
133 <td align="right"><xsl:value-of select="Stats/D"/></td> |
|
134 |
|
135 |
|
136 </tr> |
|
137 </xsl:if> |
|
138 </xsl:for-each> |
|
139 <xsl:for-each select="./Packages/Package"> |
|
140 <xsl:if test="count(error) > 0"> |
|
141 <tr> |
|
142 <td align="left"> |
|
143 <xsl:value-of select="@name"/> |
|
144 </td> |
|
145 <td align="left" colspan="8"><xsl:value-of select="error"/></td> |
|
146 </tr> |
|
147 </xsl:if> |
|
148 </xsl:for-each> |
|
149 </table> |
|
150 |
|
151 <table width="100%"><tr><td> |
|
152 <a name="NVpackages"><h2>Packages</h2></a> |
|
153 </td><td align="right"> |
|
154 [<a href="#NVsummary">summary</a>] |
|
155 [<a href="#NVpackages">packages</a>] |
|
156 [<a href="#NVcycles">cycles</a>] |
|
157 [<a href="#NVexplanations">explanations</a>] |
|
158 </td></tr></table> |
|
159 |
|
160 <xsl:for-each select="./Packages/Package"> |
|
161 <xsl:if test="count(error) = 0"> |
|
162 <h3><a><xsl:attribute name="name">PK<xsl:value-of select="@name"/></xsl:attribute> |
|
163 <xsl:value-of select="@name"/></a></h3> |
|
164 |
|
165 <table width="100%"><tr> |
|
166 <td><a href="#EXafferent">Afferent Couplings</a>: <xsl:value-of select="Stats/Ca"/></td> |
|
167 <td><a href="#EXefferent">Efferent Couplings</a>: <xsl:value-of select="Stats/Ce"/></td> |
|
168 <td><a href="#EXabstractness">Abstractness</a>: <xsl:value-of select="Stats/A"/></td> |
|
169 <td><a href="#EXinstability">Instability</a>: <xsl:value-of select="Stats/I"/></td> |
|
170 <td><a href="#EXdistance">Distance</a>: <xsl:value-of select="Stats/D"/></td> |
|
171 </tr></table> |
|
172 |
|
173 <table width="100%" class="details"> |
|
174 <tr> |
|
175 <th>Abstract Classes</th> |
|
176 <th>Concrete Classes</th> |
|
177 <th>Used by Packages</th> |
|
178 <th>Uses Packages</th> |
|
179 </tr> |
|
180 <tr> |
|
181 <td valign="top" width="25%"> |
|
182 <xsl:if test="count(AbstractClasses/Class)=0"> |
|
183 <i>None</i> |
|
184 </xsl:if> |
|
185 <xsl:for-each select="AbstractClasses/Class"> |
|
186 <xsl:value-of select="node()"/><br/> |
|
187 </xsl:for-each> |
|
188 </td> |
|
189 <td valign="top" width="25%"> |
|
190 <xsl:if test="count(ConcreteClasses/Class)=0"> |
|
191 <i>None</i> |
|
192 </xsl:if> |
|
193 <xsl:for-each select="ConcreteClasses/Class"> |
|
194 <xsl:value-of select="node()"/><br/> |
|
195 </xsl:for-each> |
|
196 </td> |
|
197 <td valign="top" width="25%"> |
|
198 <xsl:if test="count(UsedBy/Package)=0"> |
|
199 <i>None</i> |
|
200 </xsl:if> |
|
201 <xsl:for-each select="UsedBy/Package"> |
|
202 <a> |
|
203 <xsl:attribute name="href">#PK<xsl:value-of select="node()"/></xsl:attribute> |
|
204 <xsl:value-of select="node()"/> |
|
205 </a><br/> |
|
206 </xsl:for-each> |
|
207 </td> |
|
208 <td valign="top" width="25%"> |
|
209 <xsl:if test="count(DependsUpon/Package)=0"> |
|
210 <i>None</i> |
|
211 </xsl:if> |
|
212 <xsl:for-each select="DependsUpon/Package"> |
|
213 <a> |
|
214 <xsl:attribute name="href">#PK<xsl:value-of select="node()"/></xsl:attribute> |
|
215 <xsl:value-of select="node()"/> |
|
216 </a><br/> |
|
217 </xsl:for-each> |
|
218 </td> |
|
219 </tr> |
|
220 </table> |
|
221 </xsl:if> |
|
222 </xsl:for-each> |
|
223 |
|
224 <table width="100%"><tr><td> |
|
225 <a name="NVcycles"><h2>Cycles</h2></a> |
|
226 </td><td align="right"> |
|
227 [<a href="#NVsummary">summary</a>] |
|
228 [<a href="#NVpackages">packages</a>] |
|
229 [<a href="#NVcycles">cycles</a>] |
|
230 [<a href="#NVexplanations">explanations</a>] |
|
231 </td></tr></table> |
|
232 |
|
233 <xsl:if test="count(Cycles/Package) = 0"> |
|
234 <p>There are no cyclic dependancies.</p> |
|
235 </xsl:if> |
|
236 <xsl:for-each select="Cycles/Package"> |
|
237 <h3><xsl:value-of select="@Name"/></h3><p> |
|
238 <xsl:for-each select="Package"> |
|
239 <xsl:value-of select="."/><br/> |
|
240 </xsl:for-each></p> |
|
241 </xsl:for-each> |
|
242 |
|
243 <table width="100%"><tr><td> |
|
244 <a name="NVexplanations"><h2>Explanations</h2></a> |
|
245 </td><td align="right"> |
|
246 [<a href="#NVsummary">summary</a>] |
|
247 [<a href="#NVpackages">packages</a>] |
|
248 [<a href="#NVcycles">cycles</a>] |
|
249 [<a href="#NVexplanations">explanations</a>] |
|
250 </td></tr></table> |
|
251 |
|
252 <p>The following explanations are for quick reference and are lifted directly from the original <a href="http://www.clarkware.com/software/JDepend.html">JDepend documentation</a>.</p> |
|
253 |
|
254 <h3><a name="EXnumber">Number of Classes</a></h3> |
|
255 <p>The number of concrete and abstract classes (and interfaces) in the package is an indicator of the extensibility of the package.</p> |
|
256 <h3><a name="EXafferent">Afferent Couplings</a></h3> |
|
257 <p>The number of other packages that depend upon classes within the package is an indicator of the package's responsibility. </p> |
|
258 <h3><a name="EXefferent">Efferent Couplings</a></h3> |
|
259 <p>The number of other packages that the classes in the package depend upon is an indicator of the package's independence. </p> |
|
260 <h3><a name="EXabstractness">Abstractness</a></h3> |
|
261 <p>The ratio of the number of abstract classes (and interfaces) in the analyzed package to the total number of classes in the analyzed package. </p> |
|
262 <p>The range for this metric is 0 to 1, with A=0 indicating a completely concrete package and A=1 indicating a completely abstract package. </p> |
|
263 <h3><a name="EXinstability">Instability</a></h3> |
|
264 <p>The ratio of efferent coupling (Ce) to total coupling (Ce / (Ce + Ca)). This metric is an indicator of the package's resilience to change. </p> |
|
265 <p>The range for this metric is 0 to 1, with I=0 indicating a completely stable package and I=1 indicating a completely instable package. </p> |
|
266 <h3><a name="EXdistance">Distance</a></h3> |
|
267 <p>The perpendicular distance of a package from the idealized line A + I = 1. This metric is an indicator of the package's balance between abstractness and stability. </p> |
|
268 <p>A package squarely on the main sequence is optimally balanced with respect to its abstractness and stability. Ideal packages are either completely abstract and stable (x=0, y=1) or completely concrete and instable (x=1, y=0). </p> |
|
269 <p>The range for this metric is 0 to 1, with D=0 indicating a package that is coincident with the main sequence and D=1 indicating a package that is as far from the main sequence as possible. </p> |
|
270 |
|
271 </body> |
|
272 </html> |
|
273 </xsl:template> |
|
274 |
|
275 </xsl:stylesheet> |