This file is indexed.

/usr/share/openscap/xsl/oval-results-report.xsl is in libopenscap1 0.8.0-4build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Id: results_to_html.xsl 4295 2007-08-23 17:02:56Z bakerj $

****************************************************************************************
 Copyright (c) 2002-2007, The MITRE Corporation
 All rights reserved.

 Redistribution and use in source and binary forms, with or without modification, are
 permitted provided that the following conditions are met:

     * Redistributions of source code must retain the above copyright notice, this list
       of conditions and the following disclaimer.
     * Redistributions in binary form must reproduce the above copyright notice, this 
       list of conditions and the following disclaimer in the documentation and/or other
       materials provided with the distribution.
     * Neither the name of The MITRE Corporation nor the names of its contributors may be
       used to endorse or promote products derived from this software without specific 
       prior written permission.

 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
 SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
 OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
 TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

****************************************************************************************
	
	AUTHOR:Matt Burton, The Mitre Corporation 
	DATE: 02 May 2005 
	
	Modified by Loren Bandiera, MMG Security
   	   * Updating for v5 results
	DATE: 10 May 2006
	
	Reimplemented by Jon Baker, The Mitre Corporation 
	DATE: 12 October 2006 

	Modified by Vladimir Giszpenc, DSCI Contractor Supporting CERDEC S&TCD IAD
   	   * Allowing for references other than CVE such as Red Hat patches
	DATE: 18 May 2007

	Modified by Vladimir Giszpenc, DSCI Contractor Supporting CERDEC S&TCD IAD
   	   * Added some aggregate data in the Systems Analysed section
	DATE: 20 Aug 2007

	The results_to_html stylesheet converts an OVAL Results document into a more readable html format.
	General information about the source of the OVAL Definitions being reported on, and the OVAL Results
	producer is displayed. Next general information about each system analyzed is presented including a 
	table or result information. The table displays true results then all other results sorted in
	descending order by result. If the OVAL Results document has results for multiple systems a set
	of links will be generated near the top of the resulting html to allow users to easily jump to the 
	each system's results.
	
-->
<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5"
	xmlns:oval-res="http://oval.mitre.org/XMLSchema/oval-results-5" xmlns:oval-sc="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5"
	xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:apache-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#apache"
	xmlns:ind-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" xmlns:windows-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#windows"
	xmlns:unix-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix" xmlns:linux-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
	<xsl:output method="html" indent="yes" omit-xml-declaration="yes"/>

	<xsl:key name="definition-index" use="@id" match="/oval-res:oval_results/oval-def:oval_definitions/oval-def:definitions/oval-def:definition"/>

	<!-- Style declarations for pretty formatting -->
	<xsl:template name="oval_res_style">
		<style type="text/css">

TD.title {BACKGROUND-COLOR: #000000; COLOR: #ffc; TEXT-ALIGN: left; font: bold 12pt/14pt "Arial"} 
TD.label {BACKGROUND-COLOR: #99cc99; font: 10pt/12pt "Arial"}
TD.label2 {font: bold 10pt/14pt "Arial"}
TD.text {font: 10pt/12pt "Arial"}

.trueA{background-color: #FFBC8F; font: 10pt/12pt "Arial"}
.trueB{background-color: #FFE0CC; font: 10pt/12pt "Arial"}
				
.falseA{background-color: #ACD685; font: 10pt/12pt "Arial"}
.falseB{background-color: #CBE6B3; font: 10pt/12pt "Arial"}
				
.unknownA{background-color: #AEC8E0; font: 10pt/12pt "Arial"}
.unknownB{background-color: #DAE6F1; font: 10pt/12pt "Arial"}
				
.errorA{background-color: #FFDD75; font: 10pt/12pt "Arial"}
.errorB{background-color: #FFECB3; font: 10pt/12pt "Arial"}
				
.naA{background-color: #EEEEEE; font: 10pt/12pt "Arial"}
.naB{background-color: #FFFFFF; font: 10pt/12pt "Arial"}
				
.neA{background-color: #EEEEEE; font: 10pt/12pt "Arial"}
.neB{background-color: #FFFFFF; font: 10pt/12pt "Arial"}

		</style>
	</xsl:template>
	
	<xsl:template name="ResultColorTable">
		<table border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td>&#160;&#160;&#160;</td>
				<td>
					<!--<td class="label2">Result Color Key:&#160;&#160;</td>-->
					<table border="1" cellpadding="0" cellspacing="0">
						<tr>
							<td class="trueA" width="10">&#160;</td>
							<td class="trueB" width="10">&#160;</td>
							<td class="text">&#160;True&#160;&#160;</td>
						</tr>
					</table>
				</td>
				<td>&#160;&#160;&#160;</td>
				<td>
				<table border="1" cellpadding="0" cellspacing="0">
					<tr>
						<td class="falseA" width="10">&#160;</td>
						<td class="falseB" width="10">&#160;</td>
						<td class="text">&#160;False&#160;&#160;</td>
					</tr>
				</table>
				</td>
				<td>&#160;&#160;&#160;</td>
				<td>
					<table border="1" cellpadding="0" cellspacing="0">
						<tr>
							<td class="errorA" width="10">&#160;</td>
							<td class="errorB" width="10">&#160;</td>
							<td class="text">&#160;Error&#160;&#160;</td>
						</tr>
					</table>
				</td>
				<td>&#160;&#160;&#160;</td>
				<td>
					<table border="1" cellpadding="0" cellspacing="0">
						<tr>
							<td class="unknownA" width="10">&#160;</td>
							<td class="unknownB" width="10">&#160;</td>
							<td class="text">&#160;Unknown&#160;&#160;</td>
						</tr>
					</table>
				</td>
				<td>&#160;&#160;&#160;</td>
				<td>
					<table border="1" cellpadding="0" cellspacing="0">
						<tr>
							<td class="naA" width="10">&#160;</td>
							<td class="naB" width="10">&#160;</td>
							<td class="text">&#160;Not Applicable&#160;&#160;</td>
						</tr>
					</table>
				</td>
				<td>&#160;&#160;&#160;</td>
				<td>
					<table border="1" cellpadding="0" cellspacing="0">
						<tr>
							<td class="neA" width="10">&#160;</td>
							<td class="neB" width="10">&#160;</td>
							<td class="text">&#160;Not Evaluated&#160;&#160;</td>	
						</tr>
					</table>
				</td>
			</tr>
		</table>
	</xsl:template>

	<!-- Gets the top level node -->
	<xsl:template match="oval-res:oval_results">
		<html>
			<head>
				<title>OVAL Results</title>
				<!-- Get stylesheet -->
				<xsl:call-template name="oval_res_style"/>
			</head>
			<body>
								
				<!-- display results and definition generator information -->
				<table border="1" cellpadding="0" cellspacing="0" width="100%">
					<tr>
						<td width="50%">
							<xsl:call-template name="ResultGenerator">
								<xsl:with-param name="generatorElm" select="./oval-res:generator"/>
							</xsl:call-template>
						</td>
						<td width="50%">
							<xsl:call-template name="DefGenerator">
								<xsl:with-param name="generatorElm" select="./oval-def:oval_definitions/oval-def:generator"/>
							</xsl:call-template>
						</td>
					</tr>
				</table>
				<br/>

				<!-- 
					create anchors to each system in the results file
					if only one systen leave out the anchors
				-->
				<!-- 2007-08-20 Added aggregate result detail-->
				<xsl:if test="not(count(./oval-res:results/oval-res:system) = 1)">
					<table border="1" cellpadding="0" cellspacing="0">
						<tr>
							<td class="title" colspan="7">Systems Analyzed</td>
						</tr>
						<!-- display the result color coding table -->
						<tr><td colspan="7"><xsl:call-template name="ResultColorTable"/></td></tr>
						
						<tr>
							<td class="label" align="center">System</td>
							<td class="label" align="center">Trues</td>
							<td class="label" align="center">Falses</td>
							<td class="label" align="center">Errors</td>
							<td class="label" align="center">Unknown</td>
							<td class="label" align="center">Not Applicables</td>
							<td class="label" align="center">Not Evaluateds</td>
						</tr>
						<xsl:for-each select="./oval-res:results/oval-res:system">
							<tr>
								<td class="label">
									<a href="#{position()}">
										<xsl:value-of select="./oval-sc:oval_system_characteristics/oval-sc:system_info/oval-sc:primary_host_name"/>
									</a>
								</td>
								<td width="10">
									<xsl:choose>
										<xsl:when test="position() mod 2 = 1">
											<xsl:attribute name="class">trueA</xsl:attribute>	
										</xsl:when>
										<xsl:when test="position() mod 2 = 0">
											<xsl:attribute name="class">trueB</xsl:attribute>
										</xsl:when>
									</xsl:choose>
									<xsl:value-of select="count(./oval-res:definitions/oval-res:definition[@result='true'])"/>
								</td>
								<td width="10">
									<xsl:choose>
										<xsl:when test="position() mod 2 = 1">
											<xsl:attribute name="class">falseA</xsl:attribute>	
										</xsl:when>
										<xsl:when test="position() mod 2 = 0">
											<xsl:attribute name="class">falseB</xsl:attribute>
										</xsl:when>
									</xsl:choose>
									<xsl:value-of select="count(./oval-res:definitions/oval-res:definition[@result='false'])"/>
								</td>
								<td width="10">
									<xsl:choose>
										<xsl:when test="position() mod 2 = 1">
											<xsl:attribute name="class">errorA</xsl:attribute>	
										</xsl:when>
										<xsl:when test="position() mod 2 = 0">
											<xsl:attribute name="class">errorB</xsl:attribute>
										</xsl:when>
									</xsl:choose>
									<xsl:value-of select="count(./oval-res:definitions/oval-res:definition[@result='error'])"/>
								</td>
								<td width="10">
									<xsl:choose>
										<xsl:when test="position() mod 2 = 1">
											<xsl:attribute name="class">unknownA</xsl:attribute>	
										</xsl:when>
										<xsl:when test="position() mod 2 = 0">
											<xsl:attribute name="class">unknownB</xsl:attribute>
										</xsl:when>
									</xsl:choose>
									<xsl:value-of select="count(./oval-res:definitions/oval-res:definition[@result='unknown'])"/>
								</td>
								<td width="10">
									<xsl:choose>
										<xsl:when test="position() mod 2 = 1">
											<xsl:attribute name="class">naA</xsl:attribute>	
										</xsl:when>
										<xsl:when test="position() mod 2 = 0">
											<xsl:attribute name="class">naB</xsl:attribute>
										</xsl:when>
									</xsl:choose>
									<xsl:value-of select="count(./oval-res:definitions/oval-res:definition[@result='not applicable'])"/>
								</td>
								<td width="10">
									<xsl:choose>
										<xsl:when test="position() mod 2 = 1">
											<xsl:attribute name="class">neA</xsl:attribute>	
										</xsl:when>
										<xsl:when test="position() mod 2 = 0">
											<xsl:attribute name="class">neB</xsl:attribute>
										</xsl:when>
									</xsl:choose>
									<xsl:value-of select="count(./oval-res:definitions/oval-res:definition[@result='not evaluated'])"/>
								</td>
							</tr>
							<!-- 2007-08-20 Added aggregate result detail-->
						</xsl:for-each>
					</table>
					<br/>
				</xsl:if>

				<!-- 
					for each system in the results file
					 - display system info
					 - display the sc generator
					 - display results table
				-->
				<xsl:for-each select="./oval-res:results/oval-res:system">
					<!-- display the system info data -->
					<xsl:call-template name="SystemInfo">
						<xsl:with-param name="sysInfoElm" select="./oval-sc:oval_system_characteristics/oval-sc:system_info"/>
					</xsl:call-template>

					<!-- display the generator info for the sc data -->
					<xsl:call-template name="SCGenerator">
						<xsl:with-param name="generatorElm" select="./oval-sc:oval_system_characteristics/oval-sc:generator"/>
					</xsl:call-template>

					<!-- display definition results -->
					<xsl:call-template name="DefinitionsResults">
						<xsl:with-param name="definitionsElm" select="./oval-res:definitions"/>
					</xsl:call-template>
				</xsl:for-each>
			</body>
		</html>
	</xsl:template>

	<!-- Get the system_info and put it into a table. -->
	<xsl:template name="SystemInfo">
		<xsl:param name="sysInfoElm"/>
		<table border="1" cellspacing="0" cellpaddign="2" width="100%" bgcolor="#cccccc">
			<tr>
				<td class="title" colspan="2">
					<a name="{position()}">System Information</a>
				</td>
			</tr>
			<tr>
				<td class="label2" width="20%">Host Name</td>
				<td class="text" width="80%"><xsl:value-of select="$sysInfoElm/child::oval-sc:primary_host_name/text()"/>&#160;</td>
				<!-- $#160; is used to keep empty cells in the table clean -->
			</tr>
			<tr>
				<td class="label2" width="20%">Operating System</td>
				<td class="text" width="80%"><xsl:value-of select="$sysInfoElm/child::oval-sc:os_name/text()"/>&#160;</td>
			</tr>
			<tr>
				<td class="label2" width="20%">Operating System Version</td>
				<td class="text" width="80%"><xsl:value-of select="$sysInfoElm/child::oval-sc:os_version/text()"/>&#160;</td>
			</tr>
			<tr>
				<td class="label2" width="20%">Architecture</td>
				<td class="text" width="80%"><xsl:value-of select="$sysInfoElm/child::oval-sc:architecture/text()"/>&#160;</td>
			</tr>
			<tr>
				<td class="label2" width="20%">Interfaces</td>
				<td width="80%">
					<xsl:call-template name="Interfaces">
						<xsl:with-param name="iterfacesElm" select="$sysInfoElm[1]/oval-sc:interfaces"/>
					</xsl:call-template>
				</td>
			</tr>
		</table>
	</xsl:template>

	<!-- Get this interface and put it into the table, using templates to loop through all possible interfaces -->
	<xsl:template name="Interfaces">
		<xsl:param name="iterfacesElm"/>

		<xsl:for-each select="$iterfacesElm/oval-sc:interface">
			<xsl:if test="position() mod 2 = 1">
				<table border="1" cellpadding="1" cellspacing="0" width="100%" bgcolor="ffffff">
					<tr>
						<td class="label2" width="20%">Interface Name</td>
						<td class="text" width="80%"><xsl:value-of select="./oval-sc:interface_name/text()"/>&#160;</td>
					</tr>
					<tr>
						<td class="label2" width="20%">IP Address</td>
						<td class="text" width="80%"><xsl:value-of select="./oval-sc:ip_address/text()"/>&#160;</td>
					</tr>
					<tr>
						<td class="label2" width="20%">MAC Address</td>
						<td class="text" width="80%"><xsl:value-of select="./oval-sc:mac_address/text()"/>&#160;</td>
					</tr>
				</table>
			</xsl:if>
			<xsl:if test="position() mod 2 = 0">
				<table border="1" cellpadding="1" cellspacing="0" width="100%" bgcolor="eeeeee">
					<tr>
						<td class="label2" width="20%">Interface Name</td>
						<td class="text" width="80%"><xsl:value-of select="./oval-sc:interface_name/text()"/>&#160;</td>
					</tr>
					<tr>
						<td class="label2" width="20%">IP Address</td>
						<td class="text" width="80%"><xsl:value-of select="./oval-sc:ip_address/text()"/>&#160;</td>
					</tr>
					<tr>
						<td class="label2" width="20%">MAC Address</td>
						<td class="text" width="80%"><xsl:value-of select="./oval-sc:mac_address/text()"/>&#160;</td>
					</tr>
				</table>
			</xsl:if>
		</xsl:for-each>
	</xsl:template>

	<!-- Create a table for the Result Generator and call its children. -->
	<xsl:template name="ResultGenerator">
		<xsl:param name="generatorElm"/>
		<table border="1" cellspacing="0" cellpaddign="2" width="100%" bgcolor="#cccccc">
			<tr>
				<td class="title" colspan="5">OVAL Results Generator Information</td>
			</tr>
			<tr>
				<td class="label" nowrap="nowrap">Schema Version</td>
				<td class="label" nowrap="nowrap">Product Name</td>
				<td class="label" nowrap="nowrap">Product Version</td>
				<td class="label">Date</td>
				<td class="label">Time</td>
			</tr>
			<xsl:call-template name="Generator">
				<xsl:with-param name="generatorElm" select="$generatorElm"/>
			</xsl:call-template>
		</table>
	</xsl:template>

	<!-- Create a table for the System Characteristics Generator and call its children. -->
	<xsl:template name="SCGenerator">
		<xsl:param name="generatorElm"/>
		<table border="1" cellspacing="0" cellpaddign="2" width="100%" bgcolor="#cccccc">
			<tr>
				<td class="title" colspan="5">OVAL System Characteristics Generator Information</td>
			</tr>
			<tr>
				<td class="label">Schema Version</td>
				<td class="label">Product Name</td>
				<td class="label">Product Version</td>
				<td class="label">Date</td>
				<td class="label">Time</td>
			</tr>
			<xsl:call-template name="Generator">
				<xsl:with-param name="generatorElm" select="$generatorElm"/>
			</xsl:call-template>
		</table>
	</xsl:template>

	<!-- Create a table for the Definitions Generator and call its children. -->
	<xsl:template name="DefGenerator">
		<xsl:param name="generatorElm"/>
		<table border="1" cellspacing="0" cellpaddign="2" width="100%" bgcolor="#cccccc">
			<tr>
				<td class="title" colspan="5">OVAL Definition Generator Information</td>
			</tr>
			<tr>
				<td class="label" nowrap="nowrap">Schema Version</td>
				<td class="label" nowrap="nowrap">Product Name</td>
				<td class="label" nowrap="nowrap">Product Version</td>
				<td class="label">Date</td>
				<td class="label">Time</td>
			</tr>
			<xsl:call-template name="Generator">
				<xsl:with-param name="generatorElm" select="$generatorElm"/>
			</xsl:call-template>
		</table>
	</xsl:template>

	<!-- Each child of Generators (oval, system_characteristics, results) is the same, this template gets their children. -->
	<xsl:template name="Generator">
		<xsl:param name="generatorElm"/>
		<xsl:variable name="MessyNumber" select="string($generatorElm/oval:timestamp)"/>
		<td class="text"><xsl:value-of select="$generatorElm/oval:schema_version"/>&#160;</td>
		<td class="text"><xsl:value-of select="$generatorElm/oval:product_name"/>&#160;</td>
		<td class="text"><xsl:value-of select="$generatorElm/oval:product_version"/>&#160;</td>
		<td class="text">
			<!--Create variable "MessyNumber" to make time stamp a string and then print it out in a readable version -->
			<xsl:value-of select="substring($MessyNumber, 1, 4)"/>
			<!-- year -->
			<xsl:text>-</xsl:text>
			<xsl:value-of select="substring($MessyNumber, 6, 2)"/>
			<!-- month -->
			<xsl:text>-</xsl:text>
			<xsl:value-of select="substring($MessyNumber, 9, 2)"/>
			<!-- day -->
		</td>
		<td class="text">
			<xsl:value-of select="substring($MessyNumber, 12, 2)"/>
			<xsl:text>:</xsl:text>
			<!-- hour -->
			<xsl:value-of select="substring($MessyNumber, 15, 2)"/>
			<xsl:text>:</xsl:text>
			<!-- minute -->
			<xsl:value-of select="substring($MessyNumber, 18, 2)"/>&#160; <!-- second -->
		</td>
	</xsl:template>

	<xsl:template name="DefinitionsResults">
		<xsl:param name="definitionsElm"/>
		<table border="1" cellspacing="0" cellpaddign="2" width="100%">
			<tr>
				<td class="title" colspan="7">Oval Definition Results</td>
			</tr>
			<!-- display the result color coding table -->
			<tr><td colspan="7"><xsl:call-template name="ResultColorTable"/></td></tr>
			
			<tr>
				<td class="label" align="center">OVAL ID</td>
				<td class="label" align="center">Result</td>
				<td class="label" align="center">Class</td>
				<td class="label" align="center">Reference ID</td>
				<td class="label" align="center">Title</td>
			</tr>

			<!-- 
				Process true results then all others
			<xsl:for-each select="$definitionsElm/oval-res:definition[@result = 'true']">
				<xsl:sort select="@result" data-type="text" order="descending"/>
				<xsl:call-template name="Definition">
					<xsl:with-param name="definitionElm" select="."/>
				</xsl:call-template>
			</xsl:for-each>
			<xsl:for-each select="$definitionsElm/oval-res:definition[@result != 'true']">
				<xsl:sort select="@result" data-type="text" order="descending"/>
				<xsl:call-template name="Definition">
					<xsl:with-param name="definitionElm" select="."/>
				</xsl:call-template>
			</xsl:for-each>
			-->
			
			<!-- 
				Process all results in descending order by result attribute then definition id 
			<xsl:for-each select="$definitionsElm/oval-res:definition">
				<xsl:sort select="@result" data-type="text" order="descending"/>
				<xsl:sort select="@id" data-type="text" order="descending"/>
				<xsl:call-template name="Definition">
					<xsl:with-param name="definitionElm" select="."/>
				</xsl:call-template>
			</xsl:for-each>
			-->
			
			
			<!-- 
				select the definitions with the desired result
				sort them by their class
				display them 
			-->
			
			<!-- process true results -->
			<xsl:for-each select="$definitionsElm/oval-res:definition[@result='true']">
				<xsl:sort select="@id" data-type="text" order="descending"/>
				<xsl:call-template name="Definition">
					<xsl:with-param name="definitionElm" select="."/>
				</xsl:call-template>
			</xsl:for-each>
			
			<!-- process unknown results -->
			<xsl:for-each select="$definitionsElm/oval-res:definition[@result='unknown']">
				<xsl:sort select="@id" data-type="text" order="descending"/>
				<xsl:call-template name="Definition">
					<xsl:with-param name="definitionElm" select="."/>
				</xsl:call-template>
			</xsl:for-each>
			
			<!-- process error results -->
			<xsl:for-each select="$definitionsElm/oval-res:definition[@result='error']">
				<xsl:sort select="@id" data-type="text" order="descending"/>
				<xsl:call-template name="Definition">
					<xsl:with-param name="definitionElm" select="."/>
				</xsl:call-template>
			</xsl:for-each>
			
			<!-- process not evaluated results -->
			<xsl:for-each select="$definitionsElm/oval-res:definition[@result='not evaluated']">
				<xsl:sort select="@id" data-type="text" order="descending"/>
				<xsl:call-template name="Definition">
					<xsl:with-param name="definitionElm" select="."/>
				</xsl:call-template>
			</xsl:for-each>
			
			<!-- process false results -->
			<xsl:for-each select="$definitionsElm/oval-res:definition[@result='false']">
				<xsl:sort select="@id" data-type="text" order="descending"/>
				<xsl:call-template name="Definition">
					<xsl:with-param name="definitionElm" select="."/>
				</xsl:call-template>
			</xsl:for-each>
			
			<!-- process not applicable results -->
			<xsl:for-each select="$definitionsElm/oval-res:definition[@result='not applicable']">
				<xsl:sort select="@id" data-type="text" order="descending"/>
				<xsl:call-template name="Definition">
					<xsl:with-param name="definitionElm" select="."/>
				</xsl:call-template>
			</xsl:for-each>

		</table>
	</xsl:template>

	<xsl:template name="Definition">
		<xsl:param name="definitionElm"/>
		<tr>
			<!-- set results to alternating colors -->
			<xsl:choose>
				<xsl:when test="$definitionElm/@result  = 'true' and position() mod 2 = 1">
					<xsl:attribute name="class">trueA</xsl:attribute>	
				</xsl:when>
				<xsl:when test="$definitionElm/@result  = 'true' and position() mod 2 = 0">
					<xsl:attribute name="class">trueB</xsl:attribute>
				</xsl:when>
				<xsl:when test="$definitionElm/@result  = 'false' and position() mod 2 = 1">
					<xsl:attribute name="class">falseA</xsl:attribute>
				</xsl:when>
				<xsl:when test="$definitionElm/@result  = 'false' and position() mod 2 = 0">
					<xsl:attribute name="class">falseB</xsl:attribute>
				</xsl:when>
				<xsl:when test="$definitionElm/@result  = 'unknown' and position() mod 2 = 1">
					<xsl:attribute name="class">unknownA</xsl:attribute>
				</xsl:when>
				<xsl:when test="$definitionElm/@result  = 'unknown' and position() mod 2 = 0">
					<xsl:attribute name="class">unknownB</xsl:attribute>
				</xsl:when>
				<xsl:when test="$definitionElm/@result  = 'error' and position() mod 2 = 1">
					<xsl:attribute name="class">errorA</xsl:attribute>				
				</xsl:when>
				<xsl:when test="$definitionElm/@result  = 'error' and position() mod 2 = 0">
					<xsl:attribute name="class">errorB</xsl:attribute>
				</xsl:when>
				<xsl:when test="$definitionElm/@result  = 'not applicable' and position() mod 2 = 1">
					<xsl:attribute name="class">naA</xsl:attribute>				
				</xsl:when>
				<xsl:when test="$definitionElm/@result  = 'not applicable' and position() mod 2 = 0">
					<xsl:attribute name="class">naB</xsl:attribute>
				</xsl:when>
				<xsl:when test="$definitionElm/@result  = 'not evaluated' and position() mod 2 = 1">
					<xsl:attribute name="class">neA</xsl:attribute>				
				</xsl:when>
				<xsl:when test="$definitionElm/@result  = 'not evaluated' and position() mod 2 = 0">
					<xsl:attribute name="class">neB</xsl:attribute>
				</xsl:when>
			</xsl:choose>

			<!-- id -->
			<xsl:variable name="idUrl" select="concat('http://oval.mitre.org/repository/data/getDef?id=', $definitionElm/@definition_id)"/>
			<td class="text" align="center">
				<!--
				<a>
					<xsl:attribute name="target">_blank</xsl:attribute>
					<xsl:attribute name="href">
						<xsl:value-of select="$idUrl"/>
					</xsl:attribute>
					<xsl:value-of select="$definitionElm/@definition_id"/>
				</a>
				-->
				<xsl:value-of select="$definitionElm/@definition_id"/>
			</td>

			<!-- result -->
			<td class="text" align="center">
				<xsl:value-of select="$definitionElm/@result"/>
			</td>

			<!-- Class -->
			<td class="text" align="center">
				<xsl:for-each select="key('definition-index', @definition_id)">
					<xsl:value-of select="@class"/>
				</xsl:for-each>
			</td>

			<!-- reference id -->
			<td class="text" align="center">
				<xsl:for-each select="key('definition-index', @definition_id)">
					<xsl:for-each select="oval-def:metadata/oval-def:reference">
						<!--
						<a>
							<xsl:attribute name="target">_blank</xsl:attribute>
							<xsl:attribute name="href"><xsl:value-of select="@ref_url"/></xsl:attribute>
							<xsl:value-of select="@ref_id"/>
						</a>
						-->
						<xsl:value-of select="@ref_id"/>
					</xsl:for-each>&#160;
				</xsl:for-each>&#160;
			</td>

			<!-- title -->
			<td class="text">
				<xsl:for-each select="key('definition-index', @definition_id)">
					<xsl:value-of select="oval-def:metadata/oval-def:title"/>
				</xsl:for-each>&#160;
			</td>
		</tr>
	</xsl:template>
</xsl:stylesheet>