tetra 0.46.0 → 0.48.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (223) hide show
  1. data/.rubocop.yml +6 -0
  2. data/README.md +5 -12
  3. data/SPECIAL_CASES.md +3 -74
  4. data/integration-tests/build-commons.sh +5 -8
  5. data/lib/template/kit/CONTENTS +4 -3
  6. data/lib/template/kit/apache-ant-1.9.4/INSTALL +2 -0
  7. data/lib/template/kit/apache-ant-1.9.4/KEYS +1497 -0
  8. data/lib/template/kit/apache-ant-1.9.4/LICENSE +272 -0
  9. data/lib/template/kit/apache-ant-1.9.4/NOTICE +9 -0
  10. data/lib/template/kit/apache-ant-1.9.4/README +97 -0
  11. data/lib/template/kit/apache-ant-1.9.4/WHATSNEW +6108 -0
  12. data/lib/template/kit/apache-ant-1.9.4/bin/ant +336 -0
  13. data/lib/template/kit/apache-ant-1.9.4/bin/ant.bat +218 -0
  14. data/lib/template/kit/apache-ant-1.9.4/bin/ant.cmd +93 -0
  15. data/lib/template/kit/apache-ant-1.9.4/bin/antRun +24 -0
  16. data/lib/template/kit/apache-ant-1.9.4/bin/antRun.bat +50 -0
  17. data/lib/template/kit/apache-ant-1.9.4/bin/antRun.pl +66 -0
  18. data/lib/template/kit/apache-ant-1.9.4/bin/antenv.cmd +98 -0
  19. data/lib/template/kit/apache-ant-1.9.4/bin/complete-ant-cmd.pl +114 -0
  20. data/lib/template/kit/apache-ant-1.9.4/bin/envset.cmd +131 -0
  21. data/lib/template/kit/apache-ant-1.9.4/bin/lcp.bat +31 -0
  22. data/lib/template/kit/apache-ant-1.9.4/bin/runant.pl +153 -0
  23. data/lib/template/kit/apache-ant-1.9.4/bin/runant.py +102 -0
  24. data/lib/template/kit/apache-ant-1.9.4/bin/runrc.cmd +60 -0
  25. data/lib/template/kit/apache-ant-1.9.4/etc/ant-bootstrap.jar +0 -0
  26. data/lib/template/kit/apache-ant-1.9.4/etc/changelog.xsl +148 -0
  27. data/lib/template/kit/apache-ant-1.9.4/etc/checkstyle/checkstyle-frames.xsl +299 -0
  28. data/lib/template/kit/apache-ant-1.9.4/etc/checkstyle/checkstyle-text.xsl +34 -0
  29. data/lib/template/kit/apache-ant-1.9.4/etc/checkstyle/checkstyle-xdoc.xsl +130 -0
  30. data/lib/template/kit/apache-ant-1.9.4/etc/coverage-frames.xsl +489 -0
  31. data/lib/template/kit/apache-ant-1.9.4/etc/jdepend-frames.xsl +487 -0
  32. data/lib/template/kit/apache-ant-1.9.4/etc/jdepend.xsl +276 -0
  33. data/lib/template/kit/apache-ant-1.9.4/etc/junit-frames-xalan1.xsl +745 -0
  34. data/lib/template/kit/apache-ant-1.9.4/etc/junit-frames.xsl +955 -0
  35. data/lib/template/kit/apache-ant-1.9.4/etc/junit-noframes.xsl +496 -0
  36. data/lib/template/kit/apache-ant-1.9.4/etc/log.xsl +203 -0
  37. data/lib/template/kit/apache-ant-1.9.4/etc/maudit-frames.xsl +503 -0
  38. data/lib/template/kit/apache-ant-1.9.4/etc/mmetrics-frames.xsl +1026 -0
  39. data/lib/template/kit/apache-ant-1.9.4/etc/tagdiff.xsl +179 -0
  40. data/lib/template/kit/apache-ant-1.9.4/fetch.xml +335 -0
  41. data/lib/template/kit/apache-ant-1.9.4/get-m2.xml +121 -0
  42. data/lib/template/kit/apache-ant-1.9.4/lib/README +3 -0
  43. data/lib/template/kit/apache-ant-1.9.4/lib/ant-antlr.jar +0 -0
  44. data/lib/template/kit/apache-ant-1.9.4/lib/ant-antlr.pom +75 -0
  45. data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-bcel.jar +0 -0
  46. data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-bcel.pom +71 -0
  47. data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-bsf.jar +0 -0
  48. data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-bsf.pom +74 -0
  49. data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-log4j.jar +0 -0
  50. data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-log4j.pom +69 -0
  51. data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-oro.jar +0 -0
  52. data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-oro.pom +74 -0
  53. data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-regexp.jar +0 -0
  54. data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-regexp.pom +70 -0
  55. data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-resolver.jar +0 -0
  56. data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-resolver.pom +69 -0
  57. data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-xalan2.jar +0 -0
  58. data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-xalan2.pom +94 -0
  59. data/lib/template/kit/apache-ant-1.9.4/lib/ant-commons-logging.jar +0 -0
  60. data/lib/template/kit/apache-ant-1.9.4/lib/ant-commons-logging.pom +70 -0
  61. data/lib/template/kit/apache-ant-1.9.4/lib/ant-commons-net.jar +0 -0
  62. data/lib/template/kit/apache-ant-1.9.4/lib/ant-commons-net.pom +75 -0
  63. data/lib/template/kit/apache-ant-1.9.4/lib/ant-jai.jar +0 -0
  64. data/lib/template/kit/apache-ant-1.9.4/lib/ant-jai.pom +85 -0
  65. data/lib/template/kit/apache-ant-1.9.4/lib/ant-javamail.jar +0 -0
  66. data/lib/template/kit/apache-ant-1.9.4/lib/ant-javamail.pom +78 -0
  67. data/lib/template/kit/apache-ant-1.9.4/lib/ant-jdepend.jar +0 -0
  68. data/lib/template/kit/apache-ant-1.9.4/lib/ant-jdepend.pom +72 -0
  69. data/lib/template/kit/apache-ant-1.9.4/lib/ant-jmf.jar +0 -0
  70. data/lib/template/kit/apache-ant-1.9.4/lib/ant-jmf.pom +65 -0
  71. data/lib/template/kit/apache-ant-1.9.4/lib/ant-jsch.jar +0 -0
  72. data/lib/template/kit/apache-ant-1.9.4/lib/ant-jsch.pom +74 -0
  73. data/lib/template/kit/apache-ant-1.9.4/lib/ant-junit.jar +0 -0
  74. data/lib/template/kit/apache-ant-1.9.4/lib/ant-junit.pom +101 -0
  75. data/lib/template/kit/apache-ant-1.9.4/lib/ant-junit4.jar +0 -0
  76. data/lib/template/kit/apache-ant-1.9.4/lib/ant-junit4.pom +71 -0
  77. data/lib/template/kit/apache-ant-1.9.4/lib/ant-launcher.jar +0 -0
  78. data/lib/template/kit/apache-ant-1.9.4/lib/ant-launcher.pom +57 -0
  79. data/lib/template/kit/apache-ant-1.9.4/lib/ant-netrexx.jar +0 -0
  80. data/lib/template/kit/apache-ant-1.9.4/lib/ant-netrexx.pom +98 -0
  81. data/lib/template/kit/apache-ant-1.9.4/lib/ant-parent.pom +151 -0
  82. data/lib/template/kit/apache-ant-1.9.4/lib/ant-swing.jar +0 -0
  83. data/lib/template/kit/apache-ant-1.9.4/lib/ant-swing.pom +66 -0
  84. data/lib/template/kit/apache-ant-1.9.4/lib/ant-testutil.jar +0 -0
  85. data/lib/template/kit/apache-ant-1.9.4/lib/ant-testutil.pom +74 -0
  86. data/lib/template/kit/apache-ant-1.9.4/lib/ant.jar +0 -0
  87. data/lib/template/kit/apache-ant-1.9.4/lib/ant.pom +225 -0
  88. data/lib/template/kit/apache-ant-1.9.4/lib/libraries.properties +65 -0
  89. data/lib/template/kit/apache-maven-3.2.5/LICENSE +302 -0
  90. data/lib/template/kit/apache-maven-3.2.5/NOTICE +8 -0
  91. data/lib/template/kit/apache-maven-3.2.5/README.txt +77 -0
  92. data/lib/template/kit/apache-maven-3.2.5/bin/m2.conf +8 -0
  93. data/lib/template/kit/apache-maven-3.2.5/bin/mvn +202 -0
  94. data/lib/template/kit/apache-maven-3.2.5/bin/mvn.bat +197 -0
  95. data/lib/template/kit/apache-maven-3.2.5/bin/mvnDebug +200 -0
  96. data/lib/template/kit/apache-maven-3.2.5/bin/mvnDebug.bat +200 -0
  97. data/lib/template/kit/apache-maven-3.2.5/bin/mvnyjp +207 -0
  98. data/lib/template/kit/apache-maven-3.2.5/boot/plexus-classworlds-2.5.2.jar +0 -0
  99. data/lib/template/kit/apache-maven-3.2.5/conf/logging/simplelogger.properties +25 -0
  100. data/lib/template/kit/apache-maven-3.2.5/conf/settings.xml +257 -0
  101. data/lib/template/kit/apache-maven-3.2.5/lib/aether-api-1.0.0.v20140518.jar +0 -0
  102. data/lib/template/kit/apache-maven-3.2.5/lib/aether-api.license +261 -0
  103. data/lib/template/kit/apache-maven-3.2.5/lib/aether-connector-basic-1.0.0.v20140518.jar +0 -0
  104. data/lib/template/kit/apache-maven-3.2.5/lib/aether-connector-basic.license +261 -0
  105. data/lib/template/kit/apache-maven-3.2.5/lib/aether-impl-1.0.0.v20140518.jar +0 -0
  106. data/lib/template/kit/apache-maven-3.2.5/lib/aether-impl.license +261 -0
  107. data/lib/template/kit/apache-maven-3.2.5/lib/aether-spi-1.0.0.v20140518.jar +0 -0
  108. data/lib/template/kit/apache-maven-3.2.5/lib/aether-spi.license +261 -0
  109. data/lib/template/kit/apache-maven-3.2.5/lib/aether-transport-wagon-1.0.0.v20140518.jar +0 -0
  110. data/lib/template/kit/apache-maven-3.2.5/lib/aether-transport-wagon.license +261 -0
  111. data/lib/template/kit/apache-maven-3.2.5/lib/aether-util-1.0.0.v20140518.jar +0 -0
  112. data/lib/template/kit/apache-maven-3.2.5/lib/aether-util.license +261 -0
  113. data/lib/template/kit/apache-maven-3.2.5/lib/aopalliance-1.0.jar +0 -0
  114. data/lib/template/kit/apache-maven-3.2.5/lib/cdi-api-1.0.jar +0 -0
  115. data/lib/template/kit/apache-maven-3.2.5/lib/cdi-api.license +445 -0
  116. data/lib/template/kit/apache-maven-3.2.5/lib/commons-cli-1.2.jar +0 -0
  117. data/lib/template/kit/apache-maven-3.2.5/lib/commons-io-2.2.jar +0 -0
  118. data/lib/template/kit/apache-maven-3.2.5/lib/commons-lang-2.6.jar +0 -0
  119. data/lib/template/kit/apache-maven-3.2.5/lib/ext/README.txt +2 -0
  120. data/lib/template/kit/apache-maven-3.2.5/lib/guava-18.0.jar +0 -0
  121. data/lib/template/kit/apache-maven-3.2.5/lib/javax.inject-1.jar +0 -0
  122. data/lib/template/kit/apache-maven-3.2.5/lib/jsoup-1.7.2.jar +0 -0
  123. data/lib/template/kit/apache-maven-3.2.5/lib/jsoup.license +66 -0
  124. data/lib/template/kit/apache-maven-3.2.5/lib/jsr250-api-1.0.jar +0 -0
  125. data/lib/template/kit/apache-maven-3.2.5/lib/jsr250-api.license +406 -0
  126. data/lib/template/kit/apache-maven-3.2.5/lib/maven-aether-provider-3.2.5.jar +0 -0
  127. data/lib/template/kit/apache-maven-3.2.5/lib/maven-aether-provider.license +202 -0
  128. data/lib/template/kit/apache-maven-3.2.5/lib/maven-artifact-3.2.5.jar +0 -0
  129. data/lib/template/kit/apache-maven-3.2.5/lib/maven-artifact.license +202 -0
  130. data/lib/template/kit/apache-maven-3.2.5/lib/maven-compat-3.2.5.jar +0 -0
  131. data/lib/template/kit/apache-maven-3.2.5/lib/maven-compat.license +202 -0
  132. data/lib/template/kit/apache-maven-3.2.5/lib/maven-core-3.2.5.jar +0 -0
  133. data/lib/template/kit/apache-maven-3.2.5/lib/maven-core.license +202 -0
  134. data/lib/template/kit/apache-maven-3.2.5/lib/maven-embedder-3.2.5.jar +0 -0
  135. data/lib/template/kit/apache-maven-3.2.5/lib/maven-embedder.license +202 -0
  136. data/lib/template/kit/apache-maven-3.2.5/lib/maven-model-3.2.5.jar +0 -0
  137. data/lib/template/kit/apache-maven-3.2.5/lib/maven-model-builder-3.2.5.jar +0 -0
  138. data/lib/template/kit/apache-maven-3.2.5/lib/maven-model-builder.license +202 -0
  139. data/lib/template/kit/apache-maven-3.2.5/lib/maven-model.license +202 -0
  140. data/lib/template/kit/apache-maven-3.2.5/lib/maven-plugin-api-3.2.5.jar +0 -0
  141. data/lib/template/kit/apache-maven-3.2.5/lib/maven-plugin-api.license +202 -0
  142. data/lib/template/kit/apache-maven-3.2.5/lib/maven-repository-metadata-3.2.5.jar +0 -0
  143. data/lib/template/kit/apache-maven-3.2.5/lib/maven-repository-metadata.license +202 -0
  144. data/lib/template/kit/apache-maven-3.2.5/lib/maven-settings-3.2.5.jar +0 -0
  145. data/lib/template/kit/apache-maven-3.2.5/lib/maven-settings-builder-3.2.5.jar +0 -0
  146. data/lib/template/kit/apache-maven-3.2.5/lib/maven-settings-builder.license +202 -0
  147. data/lib/template/kit/apache-maven-3.2.5/lib/maven-settings.license +202 -0
  148. data/lib/template/kit/apache-maven-3.2.5/lib/org.eclipse.sisu.inject-0.3.0.M1.jar +0 -0
  149. data/lib/template/kit/apache-maven-3.2.5/lib/org.eclipse.sisu.inject.license +261 -0
  150. data/lib/template/kit/apache-maven-3.2.5/lib/org.eclipse.sisu.plexus-0.3.0.M1.jar +0 -0
  151. data/lib/template/kit/apache-maven-3.2.5/lib/org.eclipse.sisu.plexus.license +261 -0
  152. data/lib/template/kit/apache-maven-3.2.5/lib/plexus-cipher-1.7.jar +0 -0
  153. data/lib/template/kit/apache-maven-3.2.5/lib/plexus-cipher.license +445 -0
  154. data/lib/template/kit/apache-maven-3.2.5/lib/plexus-component-annotations-1.5.5.jar +0 -0
  155. data/lib/template/kit/apache-maven-3.2.5/lib/plexus-interpolation-1.21.jar +0 -0
  156. data/lib/template/kit/apache-maven-3.2.5/lib/plexus-sec-dispatcher-1.3.jar +0 -0
  157. data/lib/template/kit/apache-maven-3.2.5/lib/plexus-sec-dispatcher.license +445 -0
  158. data/lib/template/kit/apache-maven-3.2.5/lib/plexus-utils-3.0.20.jar +0 -0
  159. data/lib/template/kit/apache-maven-3.2.5/lib/sisu-guice-3.2.3-no_aop.jar +0 -0
  160. data/lib/template/kit/apache-maven-3.2.5/lib/slf4j-api-1.7.5.jar +0 -0
  161. data/lib/template/kit/apache-maven-3.2.5/lib/slf4j-api.license +190 -0
  162. data/lib/template/kit/apache-maven-3.2.5/lib/slf4j-simple-1.7.5.jar +0 -0
  163. data/lib/template/kit/apache-maven-3.2.5/lib/slf4j-simple.license +190 -0
  164. data/lib/template/kit/apache-maven-3.2.5/lib/wagon-file-2.8.jar +0 -0
  165. data/lib/template/kit/apache-maven-3.2.5/lib/wagon-file.license +202 -0
  166. data/lib/template/kit/apache-maven-3.2.5/lib/wagon-http-2.8-shaded.jar +0 -0
  167. data/lib/template/kit/apache-maven-3.2.5/lib/wagon-http-shared-2.8.jar +0 -0
  168. data/lib/template/kit/apache-maven-3.2.5/lib/wagon-http-shared.license +202 -0
  169. data/lib/template/kit/apache-maven-3.2.5/lib/wagon-http.license +202 -0
  170. data/lib/template/kit/apache-maven-3.2.5/lib/wagon-provider-api-2.8.jar +0 -0
  171. data/lib/template/kit/apache-maven-3.2.5/lib/wagon-provider-api.license +202 -0
  172. data/lib/tetra.rb +30 -29
  173. data/lib/tetra/facades/ant.rb +27 -0
  174. data/lib/tetra/{git.rb → facades/git.rb} +29 -24
  175. data/lib/tetra/facades/mvn.rb +44 -0
  176. data/lib/tetra/facades/process_runner.rb +65 -0
  177. data/lib/tetra/facades/tar.rb +20 -0
  178. data/lib/tetra/{kit_runner.rb → kit.rb} +3 -10
  179. data/lib/tetra/main.rb +12 -36
  180. data/lib/tetra/maven_website.rb +1 -1
  181. data/lib/tetra/packages/archivable.rb +3 -11
  182. data/lib/tetra/packages/{kit.rb → kit_package.rb} +1 -1
  183. data/lib/tetra/packages/{built_package.rb → package.rb} +2 -2
  184. data/lib/tetra/packages/scriptable.rb +27 -15
  185. data/lib/tetra/project.rb +18 -14
  186. data/lib/tetra/{commands/ant.rb → ui/ant_subcommand.rb} +5 -5
  187. data/lib/tetra/ui/dry_run_subcommand.rb +44 -0
  188. data/lib/tetra/{commands/generate_all.rb → ui/generate_all_subcommand.rb} +5 -5
  189. data/lib/tetra/{commands/generate_archive.rb → ui/generate_archive_subcommand.rb} +2 -2
  190. data/lib/tetra/{commands/generate_kit.rb → ui/generate_kit_subcommand.rb} +2 -2
  191. data/lib/tetra/{commands/generate_script.rb → ui/generate_script_subcommand.rb} +2 -2
  192. data/lib/tetra/{commands/generate_spec.rb → ui/generate_spec_subcommand.rb} +2 -2
  193. data/lib/tetra/{commands/get_pom.rb → ui/get_pom_subcommand.rb} +1 -1
  194. data/lib/tetra/{commands/init.rb → ui/init_subcommand.rb} +1 -1
  195. data/lib/tetra/{commands/move_jars_to_kit.rb → ui/move_jars_to_kit_subcommand.rb} +1 -1
  196. data/lib/tetra/{commands/mvn.rb → ui/mvn_subcommand.rb} +5 -5
  197. data/lib/tetra/{commands/base.rb → ui/subcommand.rb} +19 -6
  198. data/lib/tetra/version.rb +1 -1
  199. data/spec/lib/ant_spec.rb +36 -0
  200. data/spec/lib/archivable_spec.rb +1 -1
  201. data/spec/lib/built_package_spec.rb +6 -6
  202. data/spec/lib/kit_package_spec.rb +47 -0
  203. data/spec/lib/kit_spec.rb +8 -28
  204. data/spec/lib/mvn_spec.rb +47 -0
  205. data/spec/lib/project_spec.rb +11 -11
  206. data/spec/lib/scriptable_spec.rb +8 -16
  207. data/spec/spec_helper.rb +13 -4
  208. data/tetra.gemspec +1 -0
  209. metadata +207 -31
  210. data/lib/tetra/ant_runner.rb +0 -27
  211. data/lib/tetra/commands/download_maven_source_jars.rb +0 -29
  212. data/lib/tetra/commands/dry_run.rb +0 -17
  213. data/lib/tetra/commands/finish.rb +0 -22
  214. data/lib/tetra/commands/get_source.rb +0 -30
  215. data/lib/tetra/commands/list_kit_missing_sources.rb +0 -21
  216. data/lib/tetra/kit_checker.rb +0 -104
  217. data/lib/tetra/maven_runner.rb +0 -43
  218. data/lib/tetra/source_getter.rb +0 -41
  219. data/spec/lib/ant_runner_spec.rb +0 -45
  220. data/spec/lib/kit_checker_spec.rb +0 -119
  221. data/spec/lib/maven_runner_spec.rb +0 -68
  222. data/spec/lib/source_getter_spec.rb +0 -36
  223. data/spec/support/kit_runner_examples.rb +0 -15
@@ -0,0 +1,203 @@
1
+ <?xml version="1.0"?>
2
+ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3
+ <xsl:output method="html" indent="yes" encoding="US-ASCII"/>
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
+
22
+ <!--
23
+
24
+ The purpose have this XSL is to provide a nice way to look at the output
25
+ from the Ant XmlLogger (ie: ant -listener org.apache.tools.ant.XmlLogger )
26
+
27
+ @author <a href="mailto:sbailliez@apache.org">Stephane Bailliez</a>
28
+
29
+ -->
30
+ <xsl:decimal-format decimal-separator="." grouping-separator="," />
31
+
32
+ <xsl:template match="/">
33
+ <html>
34
+ <head>
35
+ <style type="text/css">
36
+ .bannercell {
37
+ border: 0px;
38
+ padding: 0px;
39
+ }
40
+ body {
41
+ margin: 0;
42
+ font:normal 100% arial,helvetica,sanserif;
43
+ background-color:#FFFFFF;
44
+ color:#000000;
45
+ }
46
+ table.status {
47
+ font:bold 80% arial,helvetica,sanserif;
48
+ background-color:#525D76;
49
+ color:#ffffff;
50
+ }
51
+ table.log tr td, tr th {
52
+ font-size: 80%;
53
+ }
54
+ .error {
55
+ color:red;
56
+ }
57
+ .warn {
58
+ color:brown;
59
+ }
60
+ .info {
61
+ color:gray;
62
+ }
63
+ .debug{
64
+ color:gray;
65
+ }
66
+ .failed {
67
+ font-size:80%;
68
+ background-color: red;
69
+ color:#FFFFFF;
70
+ font-weight: bold
71
+ }
72
+ .complete {
73
+ font-size:80%;
74
+ background-color: #525D76;
75
+ color:#FFFFFF;
76
+ font-weight: bold
77
+ }
78
+ .a td {
79
+ background: #efefef;
80
+ }
81
+ .b td {
82
+ background: #fff;
83
+ }
84
+ th, td {
85
+ text-align: left;
86
+ vertical-align: top;
87
+ }
88
+ th {
89
+ background: #ccc;
90
+ color: black;
91
+ }
92
+ table, th, td {
93
+ border: none
94
+ }
95
+ h3 {
96
+ font:bold 80% arial,helvetica,sanserif;
97
+ background: #525D76;
98
+ color: white;
99
+ text-decoration: none;
100
+ padding: 5px;
101
+ margin-right: 2px;
102
+ margin-left: 2px;
103
+ margin-bottom: 0;
104
+ }
105
+ </style>
106
+ </head>
107
+ <body>
108
+ <!-- jakarta logo -->
109
+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
110
+ <tr>
111
+ <td valign="top" class="bannercell">
112
+ <a href="http://jakarta.apache.org/">
113
+ <img src="http://jakarta.apache.org/images/jakarta-logo.gif" alt="http://jakarta.apache.org" align="left" border="0"/>
114
+ </a>
115
+ </td>
116
+ <td style="text-align:right;vertical-align:bottom">
117
+ <a href="http://ant.apache.org/">Apache Ant</a>
118
+ </td>
119
+ </tr>
120
+ </table>
121
+
122
+ <table border="0" width="100%">
123
+ <tr><td><hr noshade="yes" size="1"/></td></tr>
124
+ </table>
125
+
126
+ <xsl:apply-templates select="build"/>
127
+
128
+ </body>
129
+ </html>
130
+ </xsl:template>
131
+
132
+ <xsl:template match="build">
133
+ <!-- build status -->
134
+ <table width="100%">
135
+ <xsl:attribute name="class">
136
+ <xsl:if test="@error">failed</xsl:if>
137
+ <xsl:if test="not(@error)">complete</xsl:if>
138
+ </xsl:attribute>
139
+ <tr>
140
+ <xsl:if test="@error">
141
+ <td nowrap="yes">Build Failed</td>
142
+ </xsl:if>
143
+ <xsl:if test="not(@error)">
144
+ <td nowrap="yes">Build Complete</td>
145
+ </xsl:if>
146
+ <td style="text-align:right" nowrap="yes">Total Time: <xsl:value-of select="@time"/></td>
147
+ </tr>
148
+ <tr>
149
+ <td colspan="2">
150
+ <xsl:if test="@error">
151
+ <tt><xsl:value-of select="@error"/></tt><br/>
152
+ <i style="font-size:80%">See the <a href="#stacktrace" alt="Click for details">stacktrace</a>.</i>
153
+ </xsl:if>
154
+ </td>
155
+ </tr>
156
+ </table>
157
+ <table border="1" cellspacing="2" cellpadding="3" width="100%" style="font-size:80%">
158
+ <tr class="a"><td width="1">ant.file</td><td><xsl:value-of select="substring-after(//message[contains(text(),'ant.file')], '->')"/></td></tr>
159
+ <tr class="b"><td width="1">ant.version</td><td><xsl:value-of select="substring-after(//message[contains(text(),'ant.version')], '->')"/></td></tr>
160
+ <tr class="a"><td width="1">java.version</td><td><xsl:value-of select="substring-after(//message[contains(text(),'java.vm.version')], '->')"/></td></tr>
161
+ <tr class="b"><td width="1">os.name</td><td><xsl:value-of select="substring-after(//message[contains(text(),'os.name')], '->')"/></td></tr>
162
+ </table>
163
+ <!-- build information -->
164
+ <h3>Build events</h3>
165
+ <table class="log" border="1" cellspacing="2" cellpadding="3" width="100%">
166
+ <tr>
167
+ <th nowrap="yes" align="left" width="1%">target</th>
168
+ <th nowrap="yes" align="left" width="1%">task</th>
169
+ <th nowrap="yes" align="left">message</th>
170
+ </tr>
171
+ <xsl:apply-templates select=".//message[@priority != 'debug']"/>
172
+ </table>
173
+ <p>
174
+ <!-- stacktrace -->
175
+ <xsl:if test="stacktrace">
176
+ <a name="stacktrace"/>
177
+ <h3>Error details</h3>
178
+ <table width="100%">
179
+ <tr><td>
180
+ <pre><xsl:value-of select="stacktrace"/></pre>
181
+ </td></tr>
182
+ </table>
183
+ </xsl:if>
184
+ </p>
185
+ </xsl:template>
186
+
187
+ <!-- report every message but those with debug priority -->
188
+ <xsl:template match="message[@priority!='debug']">
189
+ <tr valign="top">
190
+ <!-- alternated row style -->
191
+ <xsl:attribute name="class">
192
+ <xsl:if test="position() mod 2 = 1">a</xsl:if>
193
+ <xsl:if test="position() mod 2 = 0">b</xsl:if>
194
+ </xsl:attribute>
195
+ <td nowrap="yes" width="1%"><xsl:value-of select="../../@name"/></td>
196
+ <td nowrap="yes" style="text-align:right" width="1%">[ <xsl:value-of select="../@name"/> ]</td>
197
+ <td class="{@priority}" nowrap="yes">
198
+ <xsl:value-of select="text()"/>
199
+ </td>
200
+ </tr>
201
+ </xsl:template>
202
+
203
+ </xsl:stylesheet>
@@ -0,0 +1,503 @@
1
+ <?xml version="1.0"?>
2
+ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
3
+ xmlns:lxslt="http://xml.apache.org/xslt"
4
+ xmlns:redirect="org.apache.xalan.lib.Redirect"
5
+ extension-element-prefixes="redirect">
6
+ <xsl:output method="html" indent="yes" encoding="US-ASCII"/>
7
+ <xsl:decimal-format decimal-separator="." grouping-separator="," />
8
+ <!--
9
+ Licensed to the Apache Software Foundation (ASF) under one or more
10
+ contributor license agreements. See the NOTICE file distributed with
11
+ this work for additional information regarding copyright ownership.
12
+ The ASF licenses this file to You under the Apache License, Version 2.0
13
+ (the "License"); you may not use this file except in compliance with
14
+ the License. You may obtain a copy of the License at
15
+
16
+ http://www.apache.org/licenses/LICENSE-2.0
17
+
18
+ Unless required by applicable law or agreed to in writing, software
19
+ distributed under the License is distributed on an "AS IS" BASIS,
20
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
+ See the License for the specific language governing permissions and
22
+ limitations under the License.
23
+ -->
24
+ <!--
25
+
26
+ Stylesheet to transform an XML file generated by the Ant MAudit task into
27
+ a set of JavaDoc-like HTML page to make pages more convenient to be browsed.
28
+
29
+ It use the Xalan redirect extension to write to multiple output files.
30
+
31
+ @author Stephane Bailliez <a href="mailto:sbailliez@apache.org"/>
32
+ -->
33
+
34
+ <xsl:param name="output.dir" select="'.'"/>
35
+
36
+
37
+ <xsl:template match="classes">
38
+ <!-- create the index.html -->
39
+ <redirect:write file="{$output.dir}/index.html">
40
+ <xsl:call-template name="index.html"/>
41
+ </redirect:write>
42
+
43
+ <!-- create the stylesheet.css -->
44
+ <redirect:write file="{$output.dir}/stylesheet.css">
45
+ <xsl:call-template name="stylesheet.css"/>
46
+ </redirect:write>
47
+
48
+ <!-- create the overview-packages.html at the root -->
49
+ <redirect:write file="{$output.dir}/overview-summary.html">
50
+ <xsl:apply-templates select="." mode="overview.packages"/>
51
+ </redirect:write>
52
+
53
+ <!-- create the all-packages.html at the root -->
54
+ <redirect:write file="{$output.dir}/overview-frame.html">
55
+ <xsl:apply-templates select="." mode="all.packages"/>
56
+ </redirect:write>
57
+
58
+ <!-- create the all-classes.html at the root -->
59
+ <redirect:write file="{$output.dir}/allclasses-frame.html">
60
+ <xsl:apply-templates select="." mode="all.classes"/>
61
+ </redirect:write>
62
+
63
+ <!-- process all packages -->
64
+ <xsl:for-each select="./class[not(./@package = preceding-sibling::class/@package)]">
65
+ <xsl:call-template name="package">
66
+ <xsl:with-param name="name" select="@package"/>
67
+ </xsl:call-template>
68
+ </xsl:for-each>
69
+ </xsl:template>
70
+
71
+
72
+ <xsl:template name="package">
73
+ <xsl:param name="name"/>
74
+ <xsl:variable name="package.dir">
75
+ <xsl:if test="not($name = '')"><xsl:value-of select="translate($name,'.','/')"/></xsl:if>
76
+ <xsl:if test="$name = ''">.</xsl:if>
77
+ </xsl:variable>
78
+ <!--Processing package <xsl:value-of select="@name"/> in <xsl:value-of select="$output.dir"/> -->
79
+ <!-- create a classes-list.html in the package directory -->
80
+ <redirect:write file="{$output.dir}/{$package.dir}/package-frame.html">
81
+ <xsl:call-template name="classes.list">
82
+ <xsl:with-param name="name" select="$name"/>
83
+ </xsl:call-template>
84
+ </redirect:write>
85
+
86
+ <!-- create a package-summary.html in the package directory -->
87
+ <redirect:write file="{$output.dir}/{$package.dir}/package-summary.html">
88
+ <xsl:call-template name="package.summary">
89
+ <xsl:with-param name="name" select="$name"/>
90
+ </xsl:call-template>
91
+ </redirect:write>
92
+
93
+ <!-- for each class, creates a @name.html -->
94
+ <!-- @bug there will be a problem with inner classes having the same name, it will be overwritten -->
95
+ <xsl:for-each select="/classes/class[@package = $name]">
96
+ <redirect:write file="{$output.dir}/{$package.dir}/{@name}.html">
97
+ <xsl:apply-templates select="." mode="class.details"/>
98
+ </redirect:write>
99
+ </xsl:for-each>
100
+ </xsl:template>
101
+
102
+ <xsl:template name="index.html">
103
+ <HTML>
104
+ <HEAD><TITLE>Audit Results.</TITLE></HEAD>
105
+ <FRAMESET cols="20%,80%">
106
+ <FRAMESET rows="30%,70%">
107
+ <FRAME src="overview-frame.html" name="packageListFrame"/>
108
+ <FRAME src="allclasses-frame.html" name="classListFrame"/>
109
+ </FRAMESET>
110
+ <FRAME src="overview-summary.html" name="classFrame"/>
111
+ </FRAMESET>
112
+ <noframes>
113
+ <H2>Frame Alert</H2>
114
+ <P>
115
+ This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
116
+ </P>
117
+ </noframes>
118
+ </HTML>
119
+ </xsl:template>
120
+
121
+
122
+ <!-- this is the stylesheet css to use for nearly everything -->
123
+ <xsl:template name="stylesheet.css">
124
+ .bannercell {
125
+ border: 0px;
126
+ padding: 0px;
127
+ }
128
+ body {
129
+ margin-left: 10;
130
+ margin-right: 10;
131
+ font:normal 80% arial,helvetica,sanserif;
132
+ background-color:#FFFFFF;
133
+ color:#000000;
134
+ }
135
+ .a td {
136
+ background: #efefef;
137
+ }
138
+ .b td {
139
+ background: #fff;
140
+ }
141
+ th, td {
142
+ text-align: left;
143
+ vertical-align: top;
144
+ }
145
+ th {
146
+ font-weight:bold;
147
+ background: #ccc;
148
+ color: black;
149
+ }
150
+ table, th, td {
151
+ font-size:100%;
152
+ border: none
153
+ }
154
+ table.log tr td, tr th {
155
+
156
+ }
157
+ h2 {
158
+ font-weight:bold;
159
+ font-size:140%;
160
+ margin-bottom: 5;
161
+ }
162
+ h3 {
163
+ font-size:100%;
164
+ font-weight:bold;
165
+ background: #525D76;
166
+ color: white;
167
+ text-decoration: none;
168
+ padding: 5px;
169
+ margin-right: 2px;
170
+ margin-left: 2px;
171
+ margin-bottom: 0;
172
+ }
173
+ </xsl:template>
174
+
175
+
176
+ <!-- print the violations of the class -->
177
+ <xsl:template match="class" mode="class.details">
178
+ <xsl:variable name="package.name" select="@package"/>
179
+ <HTML>
180
+ <HEAD>
181
+ <xsl:call-template name="create.stylesheet.link">
182
+ <xsl:with-param name="package.name" select="$package.name"/>
183
+ </xsl:call-template>
184
+ </HEAD>
185
+ <BODY>
186
+ <xsl:call-template name="pageHeader"/>
187
+ <H3>Class <xsl:if test="not($package.name = '')"><xsl:value-of select="$package.name"/>.</xsl:if><xsl:value-of select="@name"/></H3>
188
+
189
+ <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
190
+ <xsl:call-template name="class.audit.header"/>
191
+ <xsl:apply-templates select="." mode="print.audit"/>
192
+ </table>
193
+
194
+ <H3>Violations</H3>
195
+ <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
196
+ <xsl:call-template name="violation.audit.header"/>
197
+ <xsl:apply-templates select="./violation" mode="print.audit">
198
+ <xsl:sort data-type="number" select="@line"/>
199
+ </xsl:apply-templates>
200
+ </table>
201
+ <xsl:call-template name="pageFooter"/>
202
+ </BODY>
203
+ </HTML>
204
+ </xsl:template>
205
+
206
+
207
+ <!-- list of classes in a package -->
208
+ <xsl:template name="classes.list">
209
+ <xsl:param name="name"/>
210
+ <HTML>
211
+ <HEAD>
212
+ <xsl:call-template name="create.stylesheet.link">
213
+ <xsl:with-param name="package.name" select="$name"/>
214
+ </xsl:call-template>
215
+ </HEAD>
216
+ <BODY>
217
+ <table width="100%">
218
+ <tr>
219
+ <td nowrap="nowrap">
220
+ <H2><a href="package-summary.html" target="classFrame"><xsl:value-of select="$name"/></a></H2>
221
+ </td>
222
+ </tr>
223
+ </table>
224
+
225
+ <h2>Classes</h2>
226
+ <TABLE WIDTH="100%">
227
+ <xsl:apply-templates select="/classes/class[./@package = $name]" mode="classes.list">
228
+ <xsl:sort select="@name"/>
229
+ </xsl:apply-templates>
230
+ </TABLE>
231
+ </BODY>
232
+ </HTML>
233
+ </xsl:template>
234
+ <!-- the class to list -->
235
+ <xsl:template match="class" mode="classes.list">
236
+ <tr>
237
+ <td nowrap="nowrap">
238
+ <!-- @bug naming to fix for inner classes -->
239
+ <a href="{@name}.html" target="classFrame"><xsl:value-of select="@name"/></a>
240
+ </td>
241
+ </tr>
242
+ </xsl:template>
243
+
244
+
245
+ <!--
246
+ Creates an all-classes.html file that contains a link to all package-summary.html
247
+ on each class.
248
+ -->
249
+ <xsl:template match="classes" mode="all.classes">
250
+ <html>
251
+ <head>
252
+ <xsl:call-template name="create.stylesheet.link">
253
+ <xsl:with-param name="package.name"/>
254
+ </xsl:call-template>
255
+ </head>
256
+ <body>
257
+ <h2>Classes</h2>
258
+ <table width="100%">
259
+ <xsl:apply-templates select=".//class" mode="all.classes">
260
+ <xsl:sort select="@name"/>
261
+ </xsl:apply-templates>
262
+ </table>
263
+ </body>
264
+ </html>
265
+ </xsl:template>
266
+
267
+ <xsl:template match="class" mode="all.classes">
268
+ <!-- (ancestor::package)[last()] is buggy in MSXML3 ? -->
269
+ <xsl:variable name="package.name" select="@package"/>
270
+ <tr>
271
+ <td nowrap="nowrap">
272
+ <a target="classFrame">
273
+ <xsl:attribute name="href">
274
+ <xsl:if test="not($package.name='')">
275
+ <xsl:value-of select="translate($package.name,'.','/')"/><xsl:text>/</xsl:text>
276
+ </xsl:if><xsl:value-of select="@name"/><xsl:text>.html</xsl:text>
277
+ </xsl:attribute>
278
+ <xsl:value-of select="@name"/>
279
+ </a>
280
+ </td>
281
+ </tr>
282
+ </xsl:template>
283
+
284
+
285
+ <!--
286
+ Creates an html file that contains a link to all package-summary.html files on
287
+ each package existing on testsuites.
288
+ @bug there will be a problem here, I don't know yet how to handle unnamed package :(
289
+ -->
290
+ <xsl:template match="classes" mode="all.packages">
291
+ <html>
292
+ <head>
293
+ <xsl:call-template name="create.stylesheet.link">
294
+ <xsl:with-param name="package.name"/>
295
+ </xsl:call-template>
296
+ </head>
297
+ <body>
298
+ <h2><a href="overview-summary.html" target="classFrame">Home</a></h2>
299
+ <h2>Packages</h2>
300
+ <table width="100%">
301
+ <xsl:apply-templates select="class[not(./@package = preceding-sibling::class/@package)]" mode="all.packages">
302
+ <xsl:sort select="@package" order="ascending"/>
303
+ </xsl:apply-templates>
304
+ </table>
305
+ </body>
306
+ </html>
307
+ </xsl:template>
308
+
309
+ <xsl:template match="class" mode="all.packages">
310
+ <tr>
311
+ <td nowrap="nowrap">
312
+ <a href="{translate(@package,'.','/')}/package-summary.html" target="classFrame">
313
+ <xsl:value-of select="@package"/>
314
+ </a>
315
+ </td>
316
+ </tr>
317
+ </xsl:template>
318
+
319
+
320
+ <xsl:template match="classes" mode="overview.packages">
321
+ <html>
322
+ <head>
323
+ <xsl:call-template name="create.stylesheet.link">
324
+ <xsl:with-param name="package.name"/>
325
+ </xsl:call-template>
326
+ </head>
327
+ <body onload="open('allclasses-frame.html','classListFrame')">
328
+ <xsl:call-template name="pageHeader"/>
329
+ <h3>Summary</h3>
330
+ <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
331
+ <tr>
332
+ <th>Audited classes</th>
333
+ <th>Reported classes</th>
334
+ <th>Violations</th>
335
+ </tr>
336
+ <tr class="a">
337
+ <td><xsl:value-of select="@audited"/></td>
338
+ <td><xsl:value-of select="@reported"/></td>
339
+ <td><xsl:value-of select="@violations"/></td>
340
+ </tr>
341
+ </table>
342
+ <table border="0" width="100%">
343
+ <tr>
344
+ <td style="text-align: justify;">
345
+ Note: Rules checked have originated from style guidelines suggested by the language designers,
346
+ experience from the Java development community and insite experience. Violations are generally
347
+ reported with a reference to the <a href="http://java.sun.com/docs/books/jls/second_edition/html/jTOC.doc.html">Java Language Specifications</a> (JLS x.x.x)
348
+ and Metamata Audit rules (x.x).
349
+ Please consult these documents for additional information about violations.
350
+ <p/>
351
+ Rules checked also enforce adherence to <a href="http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html">Sun Java coding guidelines</a> in use at Jakarta.
352
+ <p/>
353
+ One should note that these violations do not necessary underline errors but should be used
354
+ as an indication for <i>possible</i> errors. As always, use your best judgment and review
355
+ them carefully, it might save you hours of debugging.
356
+ </td>
357
+ </tr>
358
+ </table>
359
+
360
+ <h3>Packages</h3>
361
+ <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
362
+ <xsl:call-template name="class.audit.header"/>
363
+ <xsl:for-each select="class[not(./@package = preceding-sibling::class/@package)]">
364
+ <xsl:sort select="@package" order="ascending"/>
365
+ <tr>
366
+ <xsl:call-template name="alternate-row"/>
367
+ <td><a href="{translate(@package,'.','/')}/package-summary.html"><xsl:value-of select="@package"/></a></td>
368
+ <td><xsl:value-of select="sum(/classes/class[./@package = current()/@package]/@violations)"/></td>
369
+ </tr>
370
+ </xsl:for-each>
371
+ </table>
372
+ <xsl:call-template name="pageFooter"/>
373
+ </body>
374
+ </html>
375
+ </xsl:template>
376
+
377
+
378
+ <xsl:template name="package.summary">
379
+ <xsl:param name="name"/>
380
+ <HTML>
381
+ <HEAD>
382
+ <xsl:call-template name="create.stylesheet.link">
383
+ <xsl:with-param name="package.name" select="$name"/>
384
+ </xsl:call-template>
385
+ </HEAD>
386
+ <BODY>
387
+ <xsl:attribute name="onload">open('package-frame.html','classListFrame')</xsl:attribute>
388
+ <xsl:call-template name="pageHeader"/>
389
+ <h3>Package <xsl:value-of select="$name"/></h3>
390
+
391
+ <!--table border="0" cellpadding="5" cellspacing="2" width="100%">
392
+ <xsl:call-template name="class.metrics.header"/>
393
+ <xsl:apply-templates select="." mode="print.metrics"/>
394
+ </table-->
395
+
396
+ <xsl:if test="count(/classes/class[./@package = $name]) &gt; 0">
397
+ <H3>Classes</H3>
398
+ <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
399
+ <xsl:call-template name="class.audit.header"/>
400
+ <xsl:apply-templates select="/classes/class[./@package = $name]" mode="print.audit">
401
+ <xsl:sort select="@name"/>
402
+ </xsl:apply-templates>
403
+ </table>
404
+ </xsl:if>
405
+ <xsl:call-template name="pageFooter"/>
406
+ </BODY>
407
+ </HTML>
408
+ </xsl:template>
409
+
410
+
411
+ <!--
412
+ transform string like a.b.c to ../../../
413
+ @param path the path to transform into a descending directory path
414
+ -->
415
+ <xsl:template name="path">
416
+ <xsl:param name="path"/>
417
+ <xsl:if test="contains($path,'.')">
418
+ <xsl:text>../</xsl:text>
419
+ <xsl:call-template name="path">
420
+ <xsl:with-param name="path"><xsl:value-of select="substring-after($path,'.')"/></xsl:with-param>
421
+ </xsl:call-template>
422
+ </xsl:if>
423
+ <xsl:if test="not(contains($path,'.')) and not($path = '')">
424
+ <xsl:text>../</xsl:text>
425
+ </xsl:if>
426
+ </xsl:template>
427
+
428
+
429
+ <!-- create the link to the stylesheet based on the package name -->
430
+ <xsl:template name="create.stylesheet.link">
431
+ <xsl:param name="package.name"/>
432
+ <LINK REL ="stylesheet" TYPE="text/css" TITLE="Style"><xsl:attribute name="href"><xsl:if test="not($package.name = 'unnamed package')"><xsl:call-template name="path"><xsl:with-param name="path" select="$package.name"/></xsl:call-template></xsl:if>stylesheet.css</xsl:attribute></LINK>
433
+ </xsl:template>
434
+
435
+ <!-- Page HEADER -->
436
+ <xsl:template name="pageHeader">
437
+
438
+ <!-- jakarta logo -->
439
+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
440
+ <tr>
441
+ <td class="bannercell" rowspan="2">
442
+ <a href="http://jakarta.apache.org/">
443
+ <img src="http://jakarta.apache.org/images/jakarta-logo.gif" alt="http://jakarta.apache.org" align="left" border="0"/>
444
+ </a>
445
+ </td>
446
+ <td style="text-align:right"><h2>Source Code Audit</h2></td>
447
+ </tr>
448
+ <tr>
449
+ <td style="text-align:right">Designed for use with <a href='http://www.webgain.com/products/quality_analyzer/'>Webgain QA/Metamata Audit</a> and <a href='http://jakarta.apache.org'>Ant</a>.</td>
450
+ </tr>
451
+ </table>
452
+ <hr size="1"/>
453
+ </xsl:template>
454
+
455
+ <!-- Page HEADER -->
456
+ <xsl:template name="pageFooter">
457
+ </xsl:template>
458
+
459
+
460
+ <!-- class header -->
461
+ <xsl:template name="class.audit.header">
462
+ <tr>
463
+ <th width="80%">Name</th>
464
+ <th>Violations</th>
465
+ </tr>
466
+ </xsl:template>
467
+
468
+ <!-- method header -->
469
+ <xsl:template name="violation.audit.header">
470
+ <tr>
471
+ <th>Line</th>
472
+ <th>Message</th>
473
+ </tr>
474
+ </xsl:template>
475
+
476
+
477
+ <!-- class information -->
478
+ <xsl:template match="class" mode="print.audit">
479
+ <tr>
480
+ <xsl:call-template name="alternate-row"/>
481
+ <td><a href="{@name}.html"><xsl:value-of select="@name"/></a></td>
482
+ <td><xsl:apply-templates select="@violations"/></td>
483
+ </tr>
484
+ </xsl:template>
485
+
486
+ <xsl:template match="violation" mode="print.audit">
487
+ <tr>
488
+ <xsl:call-template name="alternate-row"/>
489
+ <td><xsl:value-of select="@line"/></td>
490
+ <td><xsl:apply-templates select="@message"/></td>
491
+ </tr>
492
+ </xsl:template>
493
+
494
+ <!-- alternated row style -->
495
+ <xsl:template name="alternate-row">
496
+ <xsl:attribute name="class">
497
+ <xsl:if test="position() mod 2 = 1">a</xsl:if>
498
+ <xsl:if test="position() mod 2 = 0">b</xsl:if>
499
+ </xsl:attribute>
500
+ </xsl:template>
501
+
502
+ </xsl:stylesheet>
503
+