Project

General

Profile

Download (11.5 KB) Statistics
| Branch: | Revision:

git_sitools_idoc / flarecast / cots / ant / apache-ant-1.8.1 / etc / jdepend.xsl @ d2a8c3fd

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