Debian Codegraph @

xsl/xccdf-guide-impl.xsl

raw symbols SCIP
1 <?xml version="1.0" encoding="utf-8" ?>
2 <!--
3 Copyright 2010-2014 Red Hat Inc., Durham, North Carolina.
4 All Rights Reserved.
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with this library; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
20 Authors:
21 Martin Preisler <[email protected]>
22 Lukas Kuklinek <[email protected]>
23 -->
24
25 <!-- TODO
26 - do not display abstract items
27 -->
28
29 <xsl:stylesheet version="1.1"
30 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
31 xmlns:cdf="http://checklists.nist.gov/xccdf/1.2"
32 exclude-result-prefixes="xsl cdf">
33
34 <xsl:include href="xccdf-branding.xsl" />
35 <xsl:include href="xccdf-resources.xsl" />
36 <xsl:include href="xccdf-share.xsl" />
37 <xsl:include href="xccdf-references.xsl" />
38
39 <xsl:output
40 method="html"
41 encoding="utf-8"
42 indent="no"
43 omit-xml-declaration="yes"/>
44
45 <xsl:template name="introduction">
46 <xsl:param name="benchmark"/>
47 <xsl:param name="profile"/>
48
49 <div id="introduction">
50 <div class="row">
51 <xsl:call-template name="show-title-front-matter-description-notices">
52 <xsl:with-param name="benchmark" select="$benchmark"/>
53 <xsl:with-param name="profile" select="$profile"/>
54 </xsl:call-template>
55 </div>
56 </div>
57 </xsl:template>
58
59 <xsl:template name="profileinfo">
60 <xsl:param name="benchmark"/>
61 <xsl:param name="profile"/>
62
63 <div id="profileinfo">
64 <h2>Profile Information</h2>
65 <div class="row">
66 <div class="col-md-5 well well-lg horizontal-scroll">
67 <table class="table table-bordered">
68 <xsl:if test="$profile/cdf:title">
69 <tr>
70 <th>Profile Title</th>
71 <td>
72 <xsl:apply-templates mode="sub-testresult" select="$profile/cdf:title[1]">
73 <xsl:with-param name="benchmark" select="$benchmark"/>
74 <xsl:with-param name="profile" select="$profile"/>
75 </xsl:apply-templates>
76 </td>
77 </tr>
78 </xsl:if>
79
80 <tr>
81 <th>Profile ID</th>
82 <td>
83 <xsl:choose>
84 <xsl:when test="$profile/@id">
85 <xsl:value-of select="$profile/@id"/>
86 </xsl:when>
87 <xsl:otherwise>
88 <abbr title="No profile was selected.">(default)</abbr>
89 </xsl:otherwise>
90 </xsl:choose>
91 </td>
92 </tr>
93 </table>
94 </div>
95 <div class="col-md-3">
96 <h4>CPE Platforms</h4>
97 <xsl:choose>
98 <xsl:when test="$benchmark/cdf:platform">
99 <ul class="list-group">
100 <xsl:for-each select="$benchmark/cdf:platform">
101 <xsl:variable name="idref" select="@idref"/>
102 <xsl:if test="$benchmark/cdf:platform[@idref=$idref]">
103 <li class="list-group-item">
104 <span class="label label-default" title="CPE platform {@idref} is applicable to this Benchmark"><xsl:value-of select="@idref"/></span>
105 </li>
106 </xsl:if>
107 </xsl:for-each>
108 </ul>
109 </xsl:when>
110 <xsl:otherwise>
111 The benchmark does not specify applicable platforms.
112 </xsl:otherwise>
113 </xsl:choose>
114 </div>
115 </div>
116 </div>
117 </xsl:template>
118
119 <xsl:template name="revisionhistory">
120 <xsl:param name="benchmark"/>
121
122 <div id="revisionhistory">
123 <h2>Revision History</h2>
124 <!-- version is a required element -->
125 <p>Current version: <strong><xsl:value-of select="$benchmark/cdf:version[1]"/></strong></p>
126 <!-- at least one cdf:status is required -->
127 <ul>
128 <xsl:for-each select="$benchmark/cdf:status">
129 <xsl:sort select="@date"/>
130 <li>
131 <xsl:choose>
132 <xsl:when test="position() = 1">
133 <strong><xsl:value-of select="text()"/></strong>
134 </xsl:when>
135 <xsl:otherwise>
136 <xsl:value-of select="text()"/>
137 </xsl:otherwise>
138 </xsl:choose>
139 <xsl:if test="@date">
140 (as of <xsl:value-of select="@date"/>)
141 </xsl:if>
142 </li>
143 </xsl:for-each>
144 </ul>
145 </div>
146 </xsl:template>
147
148 <xsl:key name="profile_selects" match="//cdf:select" use="concat(generate-id(ancestor::cdf:Profile), '|', @idref)"/>
149
150 <xsl:template name="is-item-selected-final">
151 <xsl:param name="item"/>
152 <xsl:param name="profile"/>
153
154 <!--
155 assumptions of this template:
156 1) The benchmark is fully resolved
157 2) is-item-selected-final is called for Groups and only if it returns true it's called for child items
158 -->
159
160 <xsl:variable name="profile_select" select="key('profile_selects', concat(generate-id($profile), '|', $item/@id))[last()]/@selected"/>
161
162 <xsl:choose>
163 <xsl:when test="$profile_select">
164 <xsl:value-of select="$profile_select"/>
165 </xsl:when>
166 <xsl:when test="$item/@selected">
167 <xsl:value-of select="$item/@selected"/>
168 </xsl:when>
169 <xsl:otherwise>
170 <xsl:value-of select="'true'"/>
171 </xsl:otherwise>
172 </xsl:choose>
173 </xsl:template>
174
175 <xsl:template name="guide-tree-leaf">
176 <xsl:param name="item"/>
177 <xsl:param name="profile"/>
178 <xsl:param name="indent"/>
179
180 <xsl:variable name="selected_final">
181 <xsl:call-template name="is-item-selected-final">
182 <xsl:with-param name="item" select="$item"/>
183 <xsl:with-param name="profile" select="$profile"/>
184 </xsl:call-template>
185 </xsl:variable>
186
187 <xsl:if test="$selected_final = 'true'">
188 <tr data-tt-id="{$item/@id}" class="guide-tree-leaf guide-tree-leaf-id-{$item/@id}" id="guide-tree-leaf-{generate-id($item)}">
189 <xsl:attribute name="data-tt-parent-id">
190 <xsl:value-of select="concat('children-', $item/parent::cdf:*/@id)"/>
191 </xsl:attribute>
192
193 <td style="padding-left: {$indent * 19}px">
194 <table class="table table-striped table-bordered">
195 <tbody>
196 <tr><td colspan="2">
197 <h4>
198 <xsl:attribute name="id">
199 <xsl:value-of select="$item/@id"/>
200 </xsl:attribute>
201 <span class="label label-default">Rule</span>&#160;&#160;
202 <xsl:call-template name="item-title">
203 <xsl:with-param name="item" select="$item"/>
204 <xsl:with-param name="profile" select="$profile"/>
205 </xsl:call-template>
206 &#160;&#160;<a class="small" href="{concat('#', $item/@id)}">[ref]</a>
207 </h4>
208 </td></tr>
209
210 <tr><td colspan="2">
211 <xsl:if test="$item/cdf:description">
212 <div class="description">
213 <xsl:apply-templates mode="sub-testresult" select="$item/cdf:description">
214 <xsl:with-param name="benchmark" select="$item/ancestor::cdf:Benchmark"/>
215 <xsl:with-param name="profile" select="$profile"/>
216 </xsl:apply-templates>
217 </div>
218 </xsl:if>
219
220 <xsl:for-each select="$item/cdf:warning">
221 <div class="panel panel-warning">
222 <div class="panel-heading">
223 <span class="label label-warning">Warning:</span>&#160;
224 <xsl:apply-templates mode="sub-testresult" select=".">
225 <xsl:with-param name="benchmark" select="$item/ancestor::cdf:Benchmark"/>
226 <xsl:with-param name="profile" select="$profile"/>
227 </xsl:apply-templates>
228 </div>
229 </div>
230 </xsl:for-each>
231 </td></tr>
232
233 <xsl:if test="$item/cdf:rationale">
234 <tr><td><span class="label label-primary">Rationale:</span></td><td><div class="rationale">
235 <xsl:apply-templates mode="sub-testresult" select="$item/cdf:rationale">
236 <xsl:with-param name="benchmark" select="$item/ancestor::cdf:Benchmark"/>
237 <xsl:with-param name="profile" select="$profile"/>
238 </xsl:apply-templates>
239 </div></td></tr>
240 </xsl:if>
241
242 <xsl:if test="count($profile/cdf:select[@idref=$item/@id]/cdf:remark) > 0">
243 <tr><td>Remarks</td><td class="remarks">
244 <xsl:for-each select="$profile/cdf:select[@idref=$item/@id]/cdf:remark">
245 <blockquote class="small">
246 <xsl:value-of select="text()" />
247 </blockquote>
248 </xsl:for-each>
249 </td></tr>
250 </xsl:if>
251
252 <tr><td><span class="label label-warning">Severity:</span>&#160;</td><td><div class="severity">
253 <xsl:call-template name="item-severity">
254 <xsl:with-param name="item" select="$item" />
255 <xsl:with-param name="profile" select="$profile"/>
256 </xsl:call-template>
257 </div></td></tr>
258
259 <tr>
260 <td><span class="label label-primary">Rule ID:</span></td>
261 <td>
262 <xsl:value-of select="$item/@id"/>
263 </td>
264 </tr>
265
266
267 <xsl:call-template name="item-idents-refs">
268 <xsl:with-param name="item" select="$item"/>
269 </xsl:call-template>
270
271 <tr><td colspan="2"><div class="remediation-description">
272 <xsl:for-each select="$item/cdf:fixtext">
273
274 <xsl:call-template name="show-fixtext">
275 <xsl:with-param name="fixtext" select="."/>
276 <xsl:with-param name="benchmark" select="$item/ancestor::cdf:Benchmark"/>
277 <xsl:with-param name="profile" select="$profile"/>
278 </xsl:call-template>
279
280 </xsl:for-each>
281
282 <xsl:for-each select="$item/cdf:fix">
283
284 <xsl:call-template name="show-fix">
285 <xsl:with-param name="fix" select="."/>
286 <xsl:with-param name="benchmark" select="$item/ancestor::cdf:Benchmark"/>
287 <xsl:with-param name="profile" select="$profile"/>
288 </xsl:call-template>
289
290 </xsl:for-each>
291 </div></td></tr>
292 </tbody>
293 </table>
294 </td>
295 </tr>
296 </xsl:if>
297 </xsl:template>
298
299 <xsl:template name="guide-count-contained-selected-rules-impl">
300 <xsl:param name="item"/>
301 <xsl:param name="profile"/>
302
303 <xsl:variable name="selected_final">
304 <xsl:call-template name="is-item-selected-final">
305 <xsl:with-param name="item" select="$item"/>
306 <xsl:with-param name="profile" select="$profile"/>
307 </xsl:call-template>
308 </xsl:variable>
309
310 <xsl:if test="$selected_final = 'true'">
311 <xsl:for-each select="$item/cdf:Group">
312 <xsl:call-template name="guide-count-contained-selected-rules-impl">
313 <xsl:with-param name="item" select="."/>
314 <xsl:with-param name="profile" select="$profile"/>
315 </xsl:call-template>
316
317 </xsl:for-each>
318 <xsl:for-each select="$item/cdf:Rule">
319 <xsl:call-template name="guide-count-contained-selected-groups-impl">
320 <xsl:with-param name="item" select="."/>
321 <xsl:with-param name="profile" select="$profile"/>
322 </xsl:call-template>
323 <xsl:call-template name="guide-count-contained-selected-rules-impl">
324 <xsl:with-param name="item" select="."/>
325 <xsl:with-param name="profile" select="$profile"/>
326 </xsl:call-template>
327 </xsl:for-each>
328
329 <xsl:for-each select="$item/cdf:Rule">
330 <xsl:variable name="rule" select="."/>
331 <xsl:variable name="rule_selected_final">
332 <xsl:call-template name="is-item-selected-final">
333 <xsl:with-param name="item" select="$rule"/>
334 <xsl:with-param name="profile" select="$profile"/>
335 </xsl:call-template>
336 </xsl:variable>
337 <xsl:if test="$rule_selected_final = 'true'">R</xsl:if>
338 </xsl:for-each>
339 </xsl:if>
340 </xsl:template>
341
342 <xsl:template name="guide-count-contained-selected-groups-impl">
343 <xsl:param name="item"/>
344 <xsl:param name="profile"/>
345
346 <xsl:variable name="selected_group_final">
347 <xsl:call-template name="is-item-selected-final">
348 <xsl:with-param name="item" select="$item"/>
349 <xsl:with-param name="profile" select="$profile"/>
350 </xsl:call-template>
351 </xsl:variable>
352
353 <xsl:if test="$selected_group_final = 'true'">
354 <xsl:for-each select="$item/cdf:Group">
355 <xsl:call-template name="guide-count-contained-selected-groups-impl">
356 <xsl:with-param name="item" select="."/>
357 <xsl:with-param name="profile" select="$profile"/>
358 </xsl:call-template>
359 </xsl:for-each>
360
361 <xsl:for-each select="$item/cdf:Group">
362 <xsl:variable name="group" select="."/>
363 <xsl:variable name="group_selected_final">
364 <xsl:call-template name="is-item-selected-final">
365 <xsl:with-param name="item" select="$group"/>
366 <xsl:with-param name="profile" select="$profile"/>
367 </xsl:call-template>
368 </xsl:variable>
369 <xsl:if test="$group_selected_final = 'true'">G</xsl:if>
370 </xsl:for-each>
371 </xsl:if>
372 </xsl:template>
373
374 <xsl:template name="guide-count-contained-selected-rules">
375 <!-- XSLT is a functional language, you cannot "update"
376 variables. That's why we recursivelly build a huge
377 string containing 'RULE' for each selected RULE.
378 We then cound the number of RULES to get the number
379 we need. -->
380
381 <xsl:param name="item"/>
382 <xsl:param name="profile"/>
383
384 <xsl:variable name="impl-ret">
385 <xsl:call-template name="guide-count-contained-selected-rules-impl">
386 <xsl:with-param name="item" select="$item"/>
387 <xsl:with-param name="profile" select="$profile"/>
388 </xsl:call-template>
389 </xsl:variable>
390
391 <xsl:value-of select="string-length($impl-ret)"/>
392 </xsl:template>
393
394 <xsl:template name="guide-count-contained-selected-groups">
395 <!-- XSLT is a functional language, you cannot "update"
396 variables. That's why we recursivelly build a huge
397 string containing 'Group' for each selected RULE.
398 We then cound the number of Groups to get the number
399 we need. -->
400
401 <xsl:param name="item"/>
402 <xsl:param name="profile"/>
403
404 <xsl:variable name="impl-ret-group">
405 <xsl:call-template name="guide-count-contained-selected-groups-impl">
406 <xsl:with-param name="item" select="$item"/>
407 <xsl:with-param name="profile" select="$profile"/>
408 </xsl:call-template>
409 </xsl:variable>
410
411 <xsl:value-of select="string-length($impl-ret-group)"/>
412 </xsl:template>
413
414 <xsl:template name="contained-groups-wording">
415 <xsl:param name="item"/>
416 <xsl:param name="profile"/>
417
418 <xsl:variable name="contained_groups">
419 <xsl:call-template name="guide-count-contained-selected-groups">
420 <xsl:with-param name="item" select="$item"/>
421 <xsl:with-param name="profile" select="$profile"/>
422 </xsl:call-template>
423 </xsl:variable>
424
425 <xsl:choose>
426 <xsl:when test="$contained_groups > 1">
427 <small> <xsl:value-of select="$contained_groups"/> groups and </small>
428 </xsl:when>
429 <xsl:when test="$contained_groups = 1">
430 <small><xsl:value-of select="$contained_groups"/> group and </small>
431 </xsl:when>
432 <xsl:otherwise>
433 </xsl:otherwise>
434 </xsl:choose>
435 </xsl:template>
436
437 <xsl:template name="guide-tree-inner-node">
438 <xsl:param name="item"/>
439 <xsl:param name="profile"/>
440 <xsl:param name="indent"/>
441
442 <xsl:variable name="selected_final">
443 <xsl:call-template name="is-item-selected-final">
444 <xsl:with-param name="item" select="$item"/>
445 <xsl:with-param name="profile" select="$profile"/>
446 </xsl:call-template>
447 </xsl:variable>
448
449 <xsl:if test="$selected_final = 'true'">
450 <xsl:variable name="contained_rules">
451 <xsl:call-template name="guide-count-contained-selected-rules">
452 <xsl:with-param name="item" select="$item"/>
453 <xsl:with-param name="profile" select="$profile"/>
454 </xsl:call-template>
455 </xsl:variable>
456
457 <xsl:variable name="contained_groups">
458 <xsl:call-template name="contained-groups-wording">
459 <xsl:with-param name="item" select="$item"/>
460 <xsl:with-param name="profile" select="$profile"/>
461 </xsl:call-template>
462 </xsl:variable>
463
464 <tr data-tt-id="children-{$item/@id}">
465 <xsl:if test="$item/parent::cdf:Group or $item/parent::cdf:Benchmark">
466 <xsl:attribute name="data-tt-parent-id">
467 <xsl:value-of select="concat('children-', $item/parent::cdf:*/@id)"/>
468 </xsl:attribute>
469 </xsl:if>
470
471 <td style="padding-left: {$indent * 19}px">
472 <xsl:attribute name="id">
473 <xsl:value-of select="$item/@id"/>
474 </xsl:attribute>
475 <span class="label label-default">Group</span>&#160;&#160;
476 <xsl:call-template name="item-title">
477 <xsl:with-param name="item" select="$item"/>
478 <xsl:with-param name="profile" select="$profile"/>
479 </xsl:call-template>
480 <xsl:choose>
481 <xsl:when test="$contained_rules > 1">
482 &#160;&#160;<small>Group contains <xsl:value-of select="$contained_groups"/><xsl:value-of select="$contained_rules"/> rules</small>
483 </xsl:when>
484 <xsl:when test="$contained_rules = 1">
485 &#160;&#160;<small>Group contains <xsl:value-of select="$contained_groups"/><xsl:value-of select="$contained_rules"/> rule</small>
486 </xsl:when>
487 <xsl:otherwise>
488 </xsl:otherwise>
489 </xsl:choose>
490 </td>
491 </tr>
492
493 <xsl:if test="not($item/self::cdf:Benchmark)">
494 <tr data-tt-id="{$item/@id}" class="guide-tree-inner-node guide-tree-inner-node-id-{$item/@id}">
495 <xsl:if test="$item/parent::cdf:Group or $item/parent::cdf:Benchmark">
496 <xsl:attribute name="data-tt-parent-id">
497 <xsl:value-of select="concat('children-', $item/parent::cdf:*/@id)"/>
498 </xsl:attribute>
499 </xsl:if>
500
501 <td style="padding-left: {$indent * 19}px">
502 <div>
503 <a class="small" href="{concat('#', $item/@id)}">[ref]</a>&#160;&#160;
504 <xsl:apply-templates mode="sub-testresult" select="$item/cdf:description">
505 <xsl:with-param name="benchmark" select="$item/ancestor::cdf:Benchmark"/>
506 <xsl:with-param name="profile" select="$profile"/>
507 </xsl:apply-templates>
508 </div>
509
510 <xsl:for-each select="$item/cdf:warning">
511 <div class="panel panel-warning">
512 <div class="panel-heading">
513 <span class="label label-warning">Warning:</span>&#160;
514 <xsl:apply-templates mode="sub-testresult" select=".">
515 <xsl:with-param name="benchmark" select="$item/ancestor::cdf:Benchmark"/>
516 <xsl:with-param name="profile" select="$profile"/>
517 </xsl:apply-templates>
518 </div>
519 </div>
520 </xsl:for-each>
521
522 <xsl:if test="$item/cdf:reference">
523 <table class="table table-striped table-bordered">
524 <tbody>
525 <tr><td>Identifiers and References</td><td class="identifiers">
526 <xsl:call-template name="item-idents">
527 <xsl:with-param name="item" select="$item"/>
528 </xsl:call-template>
529 <xsl:call-template name="item-refs">
530 <xsl:with-param name="item" select="$item"/>
531 </xsl:call-template>
532 </td></tr>
533 </tbody>
534 </table>
535 </xsl:if>
536 </td>
537 </tr>
538 </xsl:if>
539
540 <xsl:for-each select="$item/cdf:Group">
541 <xsl:call-template name="guide-tree-inner-node">
542 <xsl:with-param name="item" select="."/>
543 <xsl:with-param name="profile" select="$profile"/>
544 <xsl:with-param name="indent" select="$indent + 1"/>
545 </xsl:call-template>
546 </xsl:for-each>
547
548 <xsl:for-each select="$item/cdf:Rule">
549 <xsl:call-template name="guide-tree-leaf">
550 <xsl:with-param name="item" select="."/>
551 <xsl:with-param name="profile" select="$profile"/>
552 <xsl:with-param name="indent" select="$indent + 1"/>
553 </xsl:call-template>
554 </xsl:for-each>
555 </xsl:if>
556 </xsl:template>
557
558 <xsl:template name="table-of-contents-items">
559 <xsl:param name="item"/>
560 <xsl:param name="levels"/>
561 <xsl:param name="profile"/>
562 <ol>
563 <xsl:for-each select="$item/cdf:Group">
564 <xsl:variable name="selected_final">
565 <xsl:call-template name="is-item-selected-final">
566 <xsl:with-param name="item" select="."/>
567 <xsl:with-param name="profile" select="$profile"/>
568 </xsl:call-template>
569 </xsl:variable>
570 <xsl:if test="$selected_final = 'true'">
571 <li>
572 <a>
573 <xsl:attribute name="href">
574 <xsl:text>#</xsl:text>
575 <xsl:value-of select="@id"/>
576 </xsl:attribute>
577 <xsl:choose>
578 <xsl:when test="cdf:title">
579 <xsl:value-of select="cdf:title"/>
580 </xsl:when>
581 <xsl:otherwise>
582 <xsl:value-of select="@id"/>
583 </xsl:otherwise>
584 </xsl:choose>
585 </a>
586 <xsl:if test="cdf:Group and $levels&gt;1">
587 <xsl:call-template name="table-of-contents-items">
588 <xsl:with-param name="item" select="."/>
589 <xsl:with-param name="levels" select="$levels - 1"/>
590 <xsl:with-param name="profile" select="$profile"/>
591 </xsl:call-template>
592 </xsl:if>
593 </li>
594 </xsl:if>
595 </xsl:for-each>
596 </ol>
597 </xsl:template>
598
599 <xsl:template name="table-of-contents">
600 <xsl:param name="benchmark"/>
601 <xsl:param name="profile"/>
602 <h2>Table of Contents</h2>
603 <xsl:call-template name="table-of-contents-items">
604 <xsl:with-param name="item" select="$benchmark"/>
605 <xsl:with-param name="levels" select="2"/>
606 <xsl:with-param name="profile" select="$profile"/>
607 </xsl:call-template>
608 </xsl:template>
609
610 <xsl:template name="guide-tree">
611 <xsl:param name="benchmark"/>
612 <xsl:param name="profile"/>
613
614 <div id="guide-tree">
615 <h2>Checklist</h2>
616
617 <table class="treetable table table-bordered">
618 <tbody>
619 <xsl:call-template name="guide-tree-inner-node">
620 <xsl:with-param name="item" select="$benchmark"/>
621 <xsl:with-param name="profile" select="$profile"/>
622 <xsl:with-param name="indent" select="0"/>
623 </xsl:call-template>
624 </tbody>
625 </table>
626 </div>
627 </xsl:template>
628
629 <xsl:template name="generate-guide">
630 <xsl:param name="benchmark"/>
631 <xsl:param name="profile_id"/>
632
633 <xsl:call-template name="warn-unresolved">
634 <xsl:with-param name="benchmark" select="$benchmark"/>
635 </xsl:call-template>
636
637 <xsl:variable name="profile" select="$benchmark/cdf:Profile[@id = $profile_id]"/>
638 <xsl:if test="$profile_id != '' and not($profile)">
639 <xsl:message terminate="yes">Profile "<xsl:value-of select="$profile_id"/>" was not found. Get available profiles using "oscap info".</xsl:message>
640 </xsl:if>
641
642 <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html></xsl:text>
643 <html lang="en">
644 <head>
645 <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
646 <meta name="viewport" content="width=device-width, initial-scale=1"/>
647 <title>
648 <xsl:call-template name="item-title">
649 <xsl:with-param name="item" select="$benchmark"/>
650 <xsl:with-param name="profile" select="$profile"/>
651 </xsl:call-template> | OpenSCAP Security Guide
652 </title>
653
654 <style><xsl:call-template name="css-sources"/></style>
655 <script><xsl:call-template name="js-sources"/></script>
656 </head>
657
658 <body>
659 <xsl:call-template name="xccdf-guide-header"/>
660
661 <div class="container"><div id="content">
662 <xsl:call-template name="introduction">
663 <xsl:with-param name="benchmark" select="$benchmark"/>
664 <xsl:with-param name="profile" select="$profile"/>
665 </xsl:call-template>
666 <xsl:call-template name="profileinfo">
667 <xsl:with-param name="benchmark" select="$benchmark"/>
668 <xsl:with-param name="profile" select="$profile"/>
669 </xsl:call-template>
670 <xsl:call-template name="revisionhistory">
671 <xsl:with-param name="benchmark" select="$benchmark"/>
672 </xsl:call-template>
673 <xsl:call-template name="table-of-contents">
674 <xsl:with-param name="benchmark" select="$benchmark"/>
675 <xsl:with-param name="profile" select="$profile"/>
676 </xsl:call-template>
677 <xsl:call-template name="guide-tree">
678 <xsl:with-param name="benchmark" select="$benchmark"/>
679 <xsl:with-param name="profile" select="$profile"/>
680 </xsl:call-template>
681 <xsl:call-template name="rear-matter">
682 <xsl:with-param name="benchmark" select="$benchmark"/>
683 <xsl:with-param name="profile" select="$profile"/>
684 </xsl:call-template>
685 </div></div>
686
687 <xsl:call-template name="xccdf-guide-footer"/>
688
689 </body>
690 </html>
691 </xsl:template>
692
693 </xsl:stylesheet>