@@ -44,44 +44,58 @@ Authors:
44
44
45
45
<xsl : template mode =' brief' match =' ovalres:oval_results' >
46
46
<xsl : param name =' definition-id' />
47
- <xsl : param name =' result' />
48
- <xsl : apply-templates select =' key("oval-definition", $definition-id)' mode =' brief' >
49
- <xsl : with-param name =' result' select =' $result' />
50
- </xsl : apply-templates >
47
+ <xsl : apply-templates select =' key("oval-definition", $definition-id)' mode =' brief' />
48
+ </xsl : template >
49
+
50
+ <xsl : template mode =' brief' match =' ovalres:extend_definition' >
51
+ <xsl : apply-templates select =' key("oval-definition", @definition_ref)' mode =' brief' />
51
52
</xsl : template >
52
53
53
- <xsl : template mode =' brief' match =' ovalres:definition|ovalres:criteria|ovalres:criterion|ovalres:extend_definition' >
54
- <xsl : param name =' result' />
54
+ <xsl : template mode =' brief' match =' ovalres:criterion' >
55
55
<xsl : apply-templates select =' key("oval-test", @test_ref)' mode =' brief' >
56
56
<xsl : with-param name =' title' select =' key("oval-testdef", @test_ref)/@comment' />
57
- <xsl : with-param name =' result' select =' $result' />
58
57
</xsl : apply-templates >
58
+ </xsl : template >
59
+
60
+ <xsl : template mode =' brief' match =' ovalres:criteria' >
59
61
<!-- descend deeper into the logic formula -->
60
- <xsl : apply-templates mode =' brief' >
61
- <xsl : with-param name =' result' select =' $result' />
62
- </xsl : apply-templates >
62
+ <xsl : apply-templates mode =' brief' />
63
+ </xsl : template >
64
+
65
+ <xsl : template mode =' brief' match =' ovalres:definition' >
66
+ <xsl : apply-templates mode =' brief' select =" ovalres:criteria" />
63
67
</xsl : template >
64
68
65
69
<!-- OVAL items dump -->
66
70
<xsl : template mode =' brief' match =' ovalres:test' >
67
71
<xsl : param name =' title' />
68
- <xsl : param name =' result' />
69
72
<xsl : variable name =' items' select =' ovalres:tested_item' />
73
+ <h4 >
74
+ <xsl : if test =' $title' >
75
+ <span class =" label label-primary" >
76
+ <xsl : value-of select =' $title' />
77
+ </span ><!-- #160 is nbsp -->  
78
+ </xsl : if >
79
+ <span class =" label label-default" >
80
+ <xsl : value-of select =' @test_id' />
81
+ </span ><!-- #160 is nbsp -->  
82
+ <xsl : choose >
83
+ <xsl : when test =" @result='true'" >
84
+ <span class =" label label-success" >
85
+ <xsl : value-of select =" @result" />
86
+ </span >
87
+ </xsl : when >
88
+ <xsl : otherwise >
89
+ <span class =" label label-danger" >
90
+ <xsl : value-of select =" @result" />
91
+ </span >
92
+ </xsl : otherwise >
93
+ </xsl : choose >
94
+ </h4 >
70
95
<xsl : choose >
71
96
<!-- if there are items to display, go ahead -->
72
97
<xsl : when test =' $items' >
73
- <h4 >
74
- <span class =" label label-primary" >
75
- <xsl : choose >
76
- <xsl : when test =' $title' ><xsl : value-of select =' $title' /></xsl : when >
77
- <xsl : otherwise >OVAL test <xsl : value-of select =' @test_id' /></xsl : otherwise >
78
- </xsl : choose >
79
- </span ><!-- #160 is nbsp -->  
80
- <xsl : choose >
81
- <xsl : when test =' $result="pass"' ><span class =" label label-success" >passed</span > because of these items:</xsl : when >
82
- <xsl : otherwise ><span class =" label label-danger" >failed</span > because of these items:</xsl : otherwise >
83
- </xsl : choose >
84
- </h4 >
98
+ <h5 >Following items have been found on the system:</h5 >
85
99
86
100
<table class =" table table-striped table-bordered" >
87
101
<!-- table head (possibly item-type-specific) -->
@@ -111,16 +125,9 @@ Authors:
111
125
<xsl : variable name =' object_id' select =' key("oval-testdef", @test_id)/*[local-name()="object"]/@object_ref' />
112
126
<xsl : variable name =' object_info' select =' key("oval-objectdef",$object_id)' />
113
127
<xsl : variable name =' state_id' select =' key("oval-testdef", @test_id)/*[local-name()="state"]/@state_ref' />
114
- <xsl : variable name =' state_info' select =' key("oval-statedef",$state_id)' />
115
128
<xsl : variable name =' comment' select =' $object_info[1]/@comment' />
116
129
<xsl : if test =" $object_info" >
117
- <h4 >
118
- <span class =" label label-primary" ><xsl : value-of select =" $title" /></span ><!-- #160 is nbsp -->  
119
- <xsl : choose >
120
- <xsl : when test =' $result="pass"' ><span class =" label label-success" >passed</span > because these items were not found:</xsl : when >
121
- <xsl : otherwise ><span class =" label label-danger" >failed</span > because these items were missing:</xsl : otherwise >
122
- </xsl : choose >
123
- </h4 >
130
+ <h5 >No items have been found conforming to the following objects:</h5 >
124
131
<h5 >Object <strong ><abbr >
125
132
<xsl : if test =' $comment' >
126
133
<xsl : attribute name =' title' >
@@ -155,27 +162,6 @@ Authors:
155
162
</tr >
156
163
</tbody >
157
164
</table >
158
- <xsl : if test =" $state_info" >
159
- <h5 >State <strong ><xsl : value-of select =' $state_id' /></strong > of type
160
- <strong ><xsl : value-of select =' local-name($state_info)' /></strong ></h5 >
161
- <table class =" table table-striped table-bordered" >
162
- <thead >
163
- <xsl : apply-templates mode =' item-head' select =' $state_info[1]' />
164
- </thead >
165
- <tbody >
166
- <tr >
167
- <xsl : variable name =' variable_id' select =' $state_info/*/@var_ref' />
168
- <xsl : if test =' $variable_id' >
169
- <td >
170
- <xsl : apply-templates mode =' normal' select =' ovalres:tested_variable' />
171
- <xsl : apply-templates mode =' message' select =' key("ovalsys-object",$object_id)' />
172
- </td >
173
- </xsl : if >
174
- <xsl : apply-templates mode =' state' select =' $state_info[1]' />
175
- </tr >
176
- </tbody >
177
- </table >
178
- </xsl : if >
179
165
</xsl : if >
180
166
</xsl : otherwise >
181
167
</xsl : choose >
0 commit comments