| 1 |
<?xml version="1.0" standalone="yes"?> |
| 2 |
<axsl:stylesheet xmlns:axsl="http://www.w3.org/1999/XSL/Transform" xmlns:sch="http://www.ascc.net/xml/schematron" xmlns:iso="http://purl.oclc.org/dsdl/schematron" xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2" xmlns:cpe2="http://cpe.mitre.org/language/2.0" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" version="1.0"> |
| 3 |
|
| 4 |
<axsl:param name="archiveDirParameter"/><axsl:param name="archiveNameParameter"/><axsl:param name="fileNameParameter"/><axsl:param name="fileDirParameter"/> |
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
<axsl:template match="*" mode="schematron-select-full-path"><axsl:apply-templates select="." mode="schematron-get-full-path"/></axsl:template> |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
<axsl:template match="*" mode="schematron-get-full-path"><axsl:apply-templates select="parent::*" mode="schematron-get-full-path"/><axsl:text>/</axsl:text><axsl:choose><axsl:when test="namespace-uri()=''"><axsl:value-of select="name()"/><axsl:variable name="p_1" select="1+ count(preceding-sibling::*[name()=name(current())])"/><axsl:if test="$p_1>1 or following-sibling::*[name()=name(current())]">[<axsl:value-of select="$p_1"/>]</axsl:if></axsl:when><axsl:otherwise><axsl:text>*[local-name()='</axsl:text><axsl:value-of select="local-name()"/><axsl:text>' and namespace-uri()='</axsl:text><axsl:value-of select="namespace-uri()"/><axsl:text>']</axsl:text><axsl:variable name="p_2" select="1+ count(preceding-sibling::*[local-name()=local-name(current())])"/><axsl:if test="$p_2>1 or following-sibling::*[local-name()=local-name(current())]">[<axsl:value-of select="$p_2"/>]</axsl:if></axsl:otherwise></axsl:choose></axsl:template><axsl:template match="@*" mode="schematron-get-full-path"><axsl:text>/</axsl:text><axsl:choose><axsl:when test="namespace-uri()=''">@<axsl:value-of select="name()"/></axsl:when><axsl:otherwise><axsl:text>@*[local-name()='</axsl:text><axsl:value-of select="local-name()"/><axsl:text>' and namespace-uri()='</axsl:text><axsl:value-of select="namespace-uri()"/><axsl:text>']</axsl:text></axsl:otherwise></axsl:choose></axsl:template> |
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
<axsl:template match="node() | @*" mode="schematron-get-full-path-2"><axsl:for-each select="ancestor-or-self::*"><axsl:text>/</axsl:text><axsl:value-of select="name(.)"/><axsl:if test="preceding-sibling::*[name(.)=name(current())]"><axsl:text>[</axsl:text><axsl:value-of select="count(preceding-sibling::*[name(.)=name(current())])+1"/><axsl:text>]</axsl:text></axsl:if></axsl:for-each><axsl:if test="not(self::*)"><axsl:text/>/@<axsl:value-of select="name(.)"/></axsl:if></axsl:template> |
| 29 |
|
| 30 |
|
| 31 |
<axsl:template match="/" mode="generate-id-from-path"/><axsl:template match="text()" mode="generate-id-from-path"><axsl:apply-templates select="parent::*" mode="generate-id-from-path"/><axsl:value-of select="concat('.text-', 1+count(preceding-sibling::text()), '-')"/></axsl:template><axsl:template match="comment()" mode="generate-id-from-path"><axsl:apply-templates select="parent::*" mode="generate-id-from-path"/><axsl:value-of select="concat('.comment-', 1+count(preceding-sibling::comment()), '-')"/></axsl:template><axsl:template match="processing-instruction()" mode="generate-id-from-path"><axsl:apply-templates select="parent::*" mode="generate-id-from-path"/><axsl:value-of select="concat('.processing-instruction-', 1+count(preceding-sibling::processing-instruction()), '-')"/></axsl:template><axsl:template match="@*" mode="generate-id-from-path"><axsl:apply-templates select="parent::*" mode="generate-id-from-path"/><axsl:value-of select="concat('.@', name())"/></axsl:template><axsl:template match="*" mode="generate-id-from-path" priority="-0.5"><axsl:apply-templates select="parent::*" mode="generate-id-from-path"/><axsl:text>.</axsl:text><axsl:value-of select="concat('.',name(),'-',1+count(preceding-sibling::*[name()=name(current())]),'-')"/></axsl:template> |
| 32 |
|
| 33 |
|
| 34 |
<axsl:template match="node() | @*" mode="schematron-get-full-path-3"><axsl:for-each select="ancestor-or-self::*"><axsl:text>/</axsl:text><axsl:value-of select="name(.)"/><axsl:if test="parent::*"><axsl:text>[</axsl:text><axsl:value-of select="count(preceding-sibling::*[name(.)=name(current())])+1"/><axsl:text>]</axsl:text></axsl:if></axsl:for-each><axsl:if test="not(self::*)"><axsl:text/>/@<axsl:value-of select="name(.)"/></axsl:if></axsl:template> |
| 35 |
|
| 36 |
|
| 37 |
<axsl:template match="/" mode="generate-id-2">U</axsl:template><axsl:template match="*" mode="generate-id-2" priority="2"><axsl:text>U</axsl:text><axsl:number level="multiple" count="*"/></axsl:template><axsl:template match="node()" mode="generate-id-2"><axsl:text>U.</axsl:text><axsl:number level="multiple" count="*"/><axsl:text>n</axsl:text><axsl:number count="node()"/></axsl:template><axsl:template match="@*" mode="generate-id-2"><axsl:text>U.</axsl:text><axsl:number level="multiple" count="*"/><axsl:text>_</axsl:text><axsl:value-of select="string-length(local-name(.))"/><axsl:text>_</axsl:text><axsl:value-of select="translate(name(),':','.')"/></axsl:template><axsl:template match="text()" priority="-1"/> |
| 38 |
|
| 39 |
|
| 40 |
<axsl:template match="/"><axsl:apply-templates select="/" mode="M9"/><axsl:apply-templates select="/" mode="M10"/><axsl:apply-templates select="/" mode="M11"/><axsl:apply-templates select="/" mode="M12"/><axsl:apply-templates select="/" mode="M13"/><axsl:apply-templates select="/" mode="M14"/><axsl:apply-templates select="/" mode="M15"/><axsl:apply-templates select="/" mode="M16"/><axsl:apply-templates select="/" mode="M17"/><axsl:apply-templates select="/" mode="M18"/><axsl:apply-templates select="/" mode="M19"/><axsl:apply-templates select="/" mode="M20"/><axsl:apply-templates select="/" mode="M21"/><axsl:apply-templates select="/" mode="M22"/><axsl:apply-templates select="/" mode="M23"/><axsl:apply-templates select="/" mode="M24"/><axsl:apply-templates select="/" mode="M25"/><axsl:apply-templates select="/" mode="M26"/><axsl:apply-templates select="/" mode="M27"/><axsl:apply-templates select="/" mode="M28"/><axsl:apply-templates select="/" mode="M29"/><axsl:apply-templates select="/" mode="M30"/><axsl:apply-templates select="/" mode="M31"/><axsl:apply-templates select="/" mode="M32"/><axsl:apply-templates select="/" mode="M33"/><axsl:apply-templates select="/" mode="M34"/><axsl:apply-templates select="/" mode="M35"/><axsl:apply-templates select="/" mode="M36"/><axsl:apply-templates select="/" mode="M37"/><axsl:apply-templates select="/" mode="M38"/><axsl:apply-templates select="/" mode="M39"/><axsl:apply-templates select="/" mode="M40"/><axsl:apply-templates select="/" mode="M41"/><axsl:apply-templates select="/" mode="M42"/><axsl:apply-templates select="/" mode="M43"/><axsl:apply-templates select="/" mode="M44"/><axsl:apply-templates select="/" mode="M45"/><axsl:apply-templates select="/" mode="M46"/><axsl:apply-templates select="/" mode="M47"/><axsl:apply-templates select="/" mode="M48"/><axsl:apply-templates select="/" mode="M49"/><axsl:apply-templates select="/" mode="M50"/><axsl:apply-templates select="/" mode="M51"/><axsl:apply-templates select="/" mode="M52"/><axsl:apply-templates select="/" mode="M53"/><axsl:apply-templates select="/" mode="M54"/><axsl:apply-templates select="/" mode="M55"/><axsl:apply-templates select="/" mode="M56"/><axsl:apply-templates select="/" mode="M57"/><axsl:apply-templates select="/" mode="M58"/><axsl:apply-templates select="/" mode="M59"/><axsl:apply-templates select="/" mode="M60"/></axsl:template> |
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
<axsl:template match="xhtml:object" priority="1000" mode="M9"> |
| 50 |
|
| 51 |
|
| 52 |
<axsl:choose><axsl:when test="starts-with(@data,'#xccdf:')"/><axsl:otherwise>Error: The @data attribute of an XHTML 'object' element must be prefixed with '#xccdf:'. See the XCCDF 1.2.1 specification, Section 7.2.3.6.3.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M9"/></axsl:template><axsl:template match="text()" priority="-1" mode="M9"/><axsl:template match="@*|node()" priority="-2" mode="M9"><axsl:apply-templates select="@*|*" mode="M9"/></axsl:template> |
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
<axsl:template match="xhtml:object" priority="1000" mode="M10"> |
| 59 |
|
| 60 |
|
| 61 |
<axsl:choose><axsl:when test="starts-with(@data,'#xccdf:title:') or starts-with(@data,'#xccdf:value:')"/><axsl:otherwise>Warning: The @data attribute of an XHTML 'object' element should have a pattern of either '#xccdf:value:[id]' or '#xccdf:title:[id]'. See the XCCDF 1.2.1 specification, Section 7.2.3.6.3.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M10"/></axsl:template><axsl:template match="text()" priority="-1" mode="M10"/><axsl:template match="@*|node()" priority="-2" mode="M10"><axsl:apply-templates select="@*|*" mode="M10"/></axsl:template> |
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
<axsl:template match="xhtml:object[starts-with(@data,'#xccdf:value:')]" priority="1000" mode="M11"><axsl:variable name="object_data_value_valid" select="not(substring-after(@data,'#xccdf:value:')='')"/><axsl:variable name="object_data_id" select="substring-after(@data,'#xccdf:value:')"/> |
| 68 |
|
| 69 |
|
| 70 |
<axsl:choose><axsl:when test="($object_data_value_valid) and (/*//xccdf:plain-text[@id=$object_data_id]|/*//xccdf:Value[@id=$object_data_id]|/*//xccdf:fact[@id=$object_data_id])"/><axsl:otherwise>Warning: The given id '<axsl:text/><axsl:value-of select="$object_data_id"/><axsl:text/>' should match a the @id attribute of a 'plain-text', 'Value', or 'fact' element. See the XCCDF 1.2.1 specification, Section 7.2.3.6.3.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M11"/></axsl:template><axsl:template match="text()" priority="-1" mode="M11"/><axsl:template match="@*|node()" priority="-2" mode="M11"><axsl:apply-templates select="@*|*" mode="M11"/></axsl:template> |
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
<axsl:template match="xhtml:a[@name]" priority="1000" mode="M12"> |
| 77 |
|
| 78 |
|
| 79 |
<axsl:choose><axsl:when test="starts-with(@name,'#xccdf:link:')"/><axsl:otherwise>Warning: The @name attribute of an XHTML 'a' element should be prefixed with '#xccdf:link:'. See the XCCDF 1.2.1 specification, Section 7.2.3.6.4.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M12"/></axsl:template><axsl:template match="text()" priority="-1" mode="M12"/><axsl:template match="@*|node()" priority="-2" mode="M12"><axsl:apply-templates select="@*|*" mode="M12"/></axsl:template> |
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
<axsl:template match="xccdf:signature" priority="1000" mode="M13"> |
| 86 |
|
| 87 |
|
| 88 |
<axsl:choose><axsl:when test="./dsig:Signature/dsig:Reference"/><axsl:otherwise>Warning: A 'signature' element should contain an XML dsig 'Signature' element, which should contain one or more 'References' elements. See the XCCDF 1.2.1 specification, Section 6.2.7.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M13"/></axsl:template><axsl:template match="text()" priority="-1" mode="M13"/><axsl:template match="@*|node()" priority="-2" mode="M13"><axsl:apply-templates select="@*|*" mode="M13"/></axsl:template> |
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
<axsl:template match="xccdf:Benchmark|xccdf:Rule|xccdf:Group|xccdf:Value|xccdf:Profile|xccdf:Tailoring/xccdf:title" priority="1000" mode="M14"> |
| 95 |
|
| 96 |
|
| 97 |
<axsl:choose><axsl:when test="./xccdf:title"/><axsl:otherwise>Warning: A '<axsl:text/><axsl:value-of select="local-name()"/><axsl:text/>' element should contain a 'title' element.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M14"/></axsl:template><axsl:template match="text()" priority="-1" mode="M14"/><axsl:template match="@*|node()" priority="-2" mode="M14"><axsl:apply-templates select="@*|*" mode="M14"/></axsl:template> |
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
<axsl:template match="xccdf:Benchmark|xccdf:Rule|xccdf:Group|xccdf:Value|xccdf:Profile" priority="1000" mode="M15"> |
| 104 |
|
| 105 |
|
| 106 |
<axsl:choose><axsl:when test="(count(./xccdf:status) < 2) or ((count(./xccdf:status) > 1) and not(./xccdf:status[not(@date)]))"/><axsl:otherwise>Error: A '<axsl:text/><axsl:value-of select="local-name()"/><axsl:text/>' element with multiple 'status' elements must have the date attribute present in all 'status' elements. See the XCCDF 1.2.1 specification, Section 6.2.8.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M15"/></axsl:template><axsl:template match="text()" priority="-1" mode="M15"/><axsl:template match="@*|node()" priority="-2" mode="M15"><axsl:apply-templates select="@*|*" mode="M15"/></axsl:template> |
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
<axsl:template match="xccdf:Rule[@extends]|xccdf:Group[@extends]|xccdf:Value[@extends]|xccdf:Profile[@extends]" priority="1000" mode="M16"><axsl:variable name="extend_ref" select="./@extends"/> |
| 113 |
|
| 114 |
|
| 115 |
<axsl:choose><axsl:when test="local-name() = local-name(/*//xccdf:Rule[@id = $extend_ref]|/*//xccdf:Group[@id = $extend_ref]|/*//xccdf:Value[@id = $extend_ref]|/*//xccdf:Profile[@id = $extend_ref])"/><axsl:otherwise>Error: A '<axsl:text/><axsl:value-of select="local-name()"/><axsl:text/>' element with an @extends attribute must extend another '<axsl:text/><axsl:value-of select="local-name()"/><axsl:text/>' element. <axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M16"/></axsl:template><axsl:template match="text()" priority="-1" mode="M16"/><axsl:template match="@*|node()" priority="-2" mode="M16"><axsl:apply-templates select="@*|*" mode="M16"/></axsl:template> |
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
<axsl:template match="xccdf:Rule/xccdf:check/xccdf:check-import" priority="1000" mode="M17"> |
| 122 |
|
| 123 |
|
| 124 |
<axsl:choose><axsl:when test="count(./*|text()) = 0"/><axsl:otherwise>Error: A 'check-import' element within a 'Rule' element must have an empty body. See the XCCDF 1.2.1 specification, Section 6.4.4.4.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M17"/></axsl:template><axsl:template match="text()" priority="-1" mode="M17"/><axsl:template match="@*|node()" priority="-2" mode="M17"><axsl:apply-templates select="@*|*" mode="M17"/></axsl:template> |
| 125 |
|
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
<axsl:template match="xccdf:Value[count(xccdf:match)>1]/xccdf:match" priority="1000" mode="M18"><axsl:variable name="selector" select="concat('',./@selector)"/> |
| 131 |
|
| 132 |
|
| 133 |
<axsl:choose><axsl:when test="count(../xccdf:match[(@selector = $selector or (not(@selector) and $selector = ''))]) = 1"/><axsl:otherwise>Error: A 'Value' element containing multiple 'match' elements must have a unique @selector attribute for each 'match' element.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M18"/></axsl:template><axsl:template match="text()" priority="-1" mode="M18"/><axsl:template match="@*|node()" priority="-2" mode="M18"><axsl:apply-templates select="@*|*" mode="M18"/></axsl:template> |
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
<axsl:template match="xccdf:Value[count(xccdf:match[not(@selector)]) > 1]/xccdf:match[not(@selector)]" priority="1000" mode="M19"> |
| 140 |
|
| 141 |
|
| 142 |
<axsl:choose><axsl:when test="false()"/><axsl:otherwise>Error: A 'Value' element may only contain zero or one 'match' elements with an omitted @selector attribute.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M19"/></axsl:template><axsl:template match="text()" priority="-1" mode="M19"/><axsl:template match="@*|node()" priority="-2" mode="M19"><axsl:apply-templates select="@*|*" mode="M19"/></axsl:template> |
| 143 |
|
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
<axsl:template match="xccdf:Value[count(xccdf:lower-bound)>1]/xccdf:lower-bound" priority="1000" mode="M20"><axsl:variable name="selector" select="concat('',./@selector)"/> |
| 149 |
|
| 150 |
|
| 151 |
<axsl:choose><axsl:when test="count(../xccdf:lower-bound[(@selector = $selector or (not(@selector) and $selector = ''))]) = 1"/><axsl:otherwise>Error: A 'Value' element containing multiple 'lower-bound' elements must have a unique @selector attribute for each 'lower-bound' element.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M20"/></axsl:template><axsl:template match="text()" priority="-1" mode="M20"/><axsl:template match="@*|node()" priority="-2" mode="M20"><axsl:apply-templates select="@*|*" mode="M20"/></axsl:template> |
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
|
| 156 |
|
| 157 |
<axsl:template match="xccdf:Value[count(xccdf:lower-bound[not(@selector)]) > 1]/xccdf:lower-bound[not(@selector)]" priority="1000" mode="M21"> |
| 158 |
|
| 159 |
|
| 160 |
<axsl:choose><axsl:when test="false()"/><axsl:otherwise>Error: A 'Value' element may only contain zero or one 'lower-bound' elements with an omitted @selector attribute.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M21"/></axsl:template><axsl:template match="text()" priority="-1" mode="M21"/><axsl:template match="@*|node()" priority="-2" mode="M21"><axsl:apply-templates select="@*|*" mode="M21"/></axsl:template> |
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
|
| 165 |
|
| 166 |
<axsl:template match="xccdf:Value[count(xccdf:upper-bound)>1]/xccdf:upper-bound" priority="1000" mode="M22"><axsl:variable name="selector" select="concat('',./@selector)"/> |
| 167 |
|
| 168 |
|
| 169 |
<axsl:choose><axsl:when test="count(../xccdf:upper-bound[(@selector = $selector or (not(@selector) and $selector = ''))]) = 1"/><axsl:otherwise>Error: A 'Value' element containing multiple 'upper-bound' elements must have a unique @selector attribute for each 'upper-bound' element.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M22"/></axsl:template><axsl:template match="text()" priority="-1" mode="M22"/><axsl:template match="@*|node()" priority="-2" mode="M22"><axsl:apply-templates select="@*|*" mode="M22"/></axsl:template> |
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
<axsl:template match="xccdf:Value[count(xccdf:upper-bound[not(@selector)]) > 1]/xccdf:upper-bound[not(@selector)]" priority="1000" mode="M23"> |
| 176 |
|
| 177 |
|
| 178 |
<axsl:choose><axsl:when test="false()"/><axsl:otherwise>Error: A 'Value' element may only contain zero or one 'upper-bound' elements with an omitted @selector attribute.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M23"/></axsl:template><axsl:template match="text()" priority="-1" mode="M23"/><axsl:template match="@*|node()" priority="-2" mode="M23"><axsl:apply-templates select="@*|*" mode="M23"/></axsl:template> |
| 179 |
|
| 180 |
|
| 181 |
|
| 182 |
|
| 183 |
|
| 184 |
<axsl:template match="xccdf:Value[count(xccdf:choices)>1]/xccdf:choices" priority="1000" mode="M24"><axsl:variable name="selector" select="concat('',./@selector)"/> |
| 185 |
|
| 186 |
|
| 187 |
<axsl:choose><axsl:when test="count(../xccdf:choices[(@selector = $selector or (not(@selector) and $selector = ''))]) = 1"/><axsl:otherwise>Error: A 'Value' element containing multiple 'choices' elements must have a unique @selector attribute for each 'choices' element.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M24"/></axsl:template><axsl:template match="text()" priority="-1" mode="M24"/><axsl:template match="@*|node()" priority="-2" mode="M24"><axsl:apply-templates select="@*|*" mode="M24"/></axsl:template> |
| 188 |
|
| 189 |
|
| 190 |
|
| 191 |
|
| 192 |
|
| 193 |
<axsl:template match="xccdf:Value[count(xccdf:choices[not(@selector)]) > 1]/xccdf:choices[not(@selector)]" priority="1000" mode="M25"> |
| 194 |
|
| 195 |
|
| 196 |
<axsl:choose><axsl:when test="false()"/><axsl:otherwise>Error: A 'Value' element may only contain zero or one 'choices' elements with an omitted @selector attribute.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M25"/></axsl:template><axsl:template match="text()" priority="-1" mode="M25"/><axsl:template match="@*|node()" priority="-2" mode="M25"><axsl:apply-templates select="@*|*" mode="M25"/></axsl:template> |
| 197 |
|
| 198 |
|
| 199 |
|
| 200 |
|
| 201 |
|
| 202 |
<axsl:template match="xccdf:Value[count(xccdf:value|xccdf:complex-value)>1]/xccdf:value|xccdf:Value[count(xccdf:value|xccdf:complex-value)>1]/xccdf:complex-value" priority="1000" mode="M26"><axsl:variable name="selector" select="concat('',./@selector)"/> |
| 203 |
|
| 204 |
|
| 205 |
<axsl:choose><axsl:when test="count(../xccdf:value[(@selector = $selector or (not(@selector) and $selector = ''))]|../xccdf:complex-value[(@selector = $selector or (not(@selector) and $selector = ''))]) = 1"/><axsl:otherwise>Error: A 'Value' element containing multiple 'value' or 'complex-value' elements must have a unique @selector attribute for each 'value' or 'complex-value' element.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M26"/></axsl:template><axsl:template match="text()" priority="-1" mode="M26"/><axsl:template match="@*|node()" priority="-2" mode="M26"><axsl:apply-templates select="@*|*" mode="M26"/></axsl:template> |
| 206 |
|
| 207 |
|
| 208 |
|
| 209 |
|
| 210 |
|
| 211 |
<axsl:template match="xccdf:Value[count(xccdf:value[not(@selector)]|xccdf:complex-value[not(@selector)]) > 1]" priority="1000" mode="M27"> |
| 212 |
|
| 213 |
|
| 214 |
<axsl:choose><axsl:when test="false()"/><axsl:otherwise>Error: A 'Value' element may only contain zero or one 'value' or 'complex-value' elements with an omitted @selector attribute.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M27"/></axsl:template><axsl:template match="text()" priority="-1" mode="M27"/><axsl:template match="@*|node()" priority="-2" mode="M27"><axsl:apply-templates select="@*|*" mode="M27"/></axsl:template> |
| 215 |
|
| 216 |
|
| 217 |
|
| 218 |
|
| 219 |
|
| 220 |
<axsl:template match="xccdf:Value[count(xccdf:default|xccdf:complex-default)>1]/xccdf:default|xccdf:Value[count(xccdf:default|xccdf:complex-default)>1]/xccdf:complex-default" priority="1000" mode="M28"><axsl:variable name="selector" select="concat('',./@selector)"/> |
| 221 |
|
| 222 |
|
| 223 |
<axsl:choose><axsl:when test="count(../xccdf:default[(@selector = $selector or (not(@selector) and $selector = ''))]|../xccdf:complex-default[(@selector = $selector or (not(@selector) and $selector = ''))]) = 1"/><axsl:otherwise>Error: A 'Value' element containing multiple 'default' or 'complex-default' elements must have a unique @selector attribute for each 'default' or 'complex-default' element.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M28"/></axsl:template><axsl:template match="text()" priority="-1" mode="M28"/><axsl:template match="@*|node()" priority="-2" mode="M28"><axsl:apply-templates select="@*|*" mode="M28"/></axsl:template> |
| 224 |
|
| 225 |
|
| 226 |
|
| 227 |
|
| 228 |
|
| 229 |
<axsl:template match="xccdf:Value[count(xccdf:default[not(@selector)]|xccdf:complex-default[not(@selector)]) > 1]" priority="1000" mode="M29"> |
| 230 |
|
| 231 |
|
| 232 |
<axsl:choose><axsl:when test="false()"/><axsl:otherwise>Error: A 'Value' element may only contain zero or one 'default' or 'complex-default' elements with an omitted @selector attribute.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M29"/></axsl:template><axsl:template match="text()" priority="-1" mode="M29"/><axsl:template match="@*|node()" priority="-2" mode="M29"><axsl:apply-templates select="@*|*" mode="M29"/></axsl:template> |
| 233 |
|
| 234 |
|
| 235 |
|
| 236 |
|
| 237 |
|
| 238 |
<axsl:template match="xccdf:Profile[xccdf:select|xccdf:refine-rule]/xccdf:select|xccdf:refine-rule" priority="1000" mode="M30"><axsl:variable name="idref" select="./@idref"/> |
| 239 |
|
| 240 |
|
| 241 |
<axsl:choose><axsl:when test="/*//xccdf:Rule[@id=$idref or @cluster-id=$idref]|/*//xccdf:Group[@id=$idref or @cluster-id=$idref]"/><axsl:otherwise>Error: The given @idref attribute '<axsl:text/><axsl:value-of select="$idref"/><axsl:text/>' must match a the @id or @cluster-id attributes of a 'Rule' or 'Group' element. See the XCCDF 1.2.1 specification, Section 6.5.3.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M30"/></axsl:template><axsl:template match="text()" priority="-1" mode="M30"/><axsl:template match="@*|node()" priority="-2" mode="M30"><axsl:apply-templates select="@*|*" mode="M30"/></axsl:template> |
| 242 |
|
| 243 |
|
| 244 |
|
| 245 |
|
| 246 |
|
| 247 |
<axsl:template match="xccdf:Profile[xccdf:refine-value|xccdf:set-value|xccdf:set-complex-value]/xccdf:refine-value|xccdf:set-value|xccdf:set-complex-value" priority="1000" mode="M31"><axsl:variable name="idref" select="./@idref"/> |
| 248 |
|
| 249 |
|
| 250 |
<axsl:choose><axsl:when test="/*//xccdf:Value[@id=$idref or @cluster-id=$idref]"/><axsl:otherwise>Error: The given @idref attribute '<axsl:text/><axsl:value-of select="$idref"/><axsl:text/>' must match a the @id or @cluster-id attributes of a 'Value' element. See the XCCDF 1.2.1 specification, Section 6.5.3.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M31"/></axsl:template><axsl:template match="text()" priority="-1" mode="M31"/><axsl:template match="@*|node()" priority="-2" mode="M31"><axsl:apply-templates select="@*|*" mode="M31"/></axsl:template> |
| 251 |
|
| 252 |
|
| 253 |
|
| 254 |
|
| 255 |
|
| 256 |
<axsl:template match="xccdf:TestResult[xccdf:rule-result[xccdf:override]]/xccdf:rule-result/xccdf:result" priority="1000" mode="M32"><axsl:variable name="current_result" select="."/> |
| 257 |
|
| 258 |
|
| 259 |
<axsl:choose><axsl:when test="../xccdf:override/xccdf:new-result = $current_result"/><axsl:otherwise>Error: The value of the 'result' element must match the value of the 'new-result' element in an 'override' element when present. See the XCCDF 1.2.1 specification, Section 6.6.4.3.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M32"/></axsl:template><axsl:template match="text()" priority="-1" mode="M32"/><axsl:template match="@*|node()" priority="-2" mode="M32"><axsl:apply-templates select="@*|*" mode="M32"/></axsl:template> |
| 260 |
|
| 261 |
|
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
<axsl:template match="xccdf:TestResult[xccdf:rule-result]/xccdf:rule-result" priority="1000" mode="M33"><axsl:variable name="idref" select="./@idref"/> |
| 266 |
|
| 267 |
|
| 268 |
<axsl:choose><axsl:when test="./ancestor::xccdf:Benchmark//xccdf:Rule[@id=$idref]"/><axsl:otherwise>Error: The given @idref attribute '<axsl:text/><axsl:value-of select="$idref"/><axsl:text/>' must match a the @id attribute of a 'Rule' element. See the XCCDF 1.2.1 specification, Section 6.6.4.1.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M33"/></axsl:template><axsl:template match="text()" priority="-1" mode="M33"/><axsl:template match="@*|node()" priority="-2" mode="M33"><axsl:apply-templates select="@*|*" mode="M33"/></axsl:template> |
| 269 |
|
| 270 |
|
| 271 |
|
| 272 |
|
| 273 |
|
| 274 |
<axsl:template match="xccdf:Benchmark[(count(xccdf:metadata) = 0) or (not(xccdf:metadata/*[namespace-uri() = 'http://purl.org/dc/elements/1.1/']))]" priority="1000" mode="M34"> |
| 275 |
|
| 276 |
|
| 277 |
<axsl:choose><axsl:when test="false()"/><axsl:otherwise>Warning: A 'Benchmark' element should have a 'metadata' element, and it should contain a child from the Dublin Core schema. See the XCCDF 1.2.1 specification, Section 6.2.4.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M34"/></axsl:template><axsl:template match="text()" priority="-1" mode="M34"/><axsl:template match="@*|node()" priority="-2" mode="M34"><axsl:apply-templates select="@*|*" mode="M34"/></axsl:template> |
| 278 |
|
| 279 |
|
| 280 |
|
| 281 |
|
| 282 |
|
| 283 |
<axsl:template match="xccdf:platform[not(starts-with(@idref,'cpe:/') or starts-with(@idref,'cpe:2.3:') or starts-with(@idref,'#'))]" priority="1000" mode="M35"> |
| 284 |
|
| 285 |
|
| 286 |
<axsl:choose><axsl:when test="false()"/><axsl:otherwise>Warning: The @idref attribute of a 'platform' element must begin with 'cpe:/' (CPE name version 2.2 and earlier),'cpe:2.3:' (CPE name version 2.3), or '#' (followed by the @id value of a CPE 'platform-specification' element). See the XCCDF 1.2.1 specification, Section 6.2.5.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M35"/></axsl:template><axsl:template match="text()" priority="-1" mode="M35"/><axsl:template match="@*|node()" priority="-2" mode="M35"><axsl:apply-templates select="@*|*" mode="M35"/></axsl:template> |
| 287 |
|
| 288 |
|
| 289 |
|
| 290 |
|
| 291 |
|
| 292 |
<axsl:template match="xccdf:platform[starts-with(@idref,'cpe:/')]" priority="1000" mode="M36"> |
| 293 |
|
| 294 |
|
| 295 |
<axsl:choose><axsl:when test="false()"/><axsl:otherwise>Warning: The 'cpe:/' prefix (CPE URI binding) is allowed within an @idref attribute, but the CPE Formatted String binding is preferred. See the XCCDF 1.2.1 specification, Section 6.2.5.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M36"/></axsl:template><axsl:template match="text()" priority="-1" mode="M36"/><axsl:template match="@*|node()" priority="-2" mode="M36"><axsl:apply-templates select="@*|*" mode="M36"/></axsl:template> |
| 296 |
|
| 297 |
|
| 298 |
|
| 299 |
|
| 300 |
|
| 301 |
<axsl:template match="xccdf:platform[starts-with(@idref,'#')]" priority="1000" mode="M37"><axsl:variable name="platformid" select="substring-after(@idref,'#')"/> |
| 302 |
|
| 303 |
|
| 304 |
<axsl:choose><axsl:when test="./ancestor::xccdf:Benchmark/cpe2:platform-specification/cpe2:platform[@id = $platformid]"/><axsl:otherwise>Warning: No matching 'platform' element with an @id of '<axsl:text/><axsl:value-of select="$platformid"/><axsl:text/>' found within a 'platform-specification' element of the 'Benchmark' element. See the XCCDF 1.2.1 specification, Section 6.2.5.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M37"/></axsl:template><axsl:template match="text()" priority="-1" mode="M37"/><axsl:template match="@*|node()" priority="-2" mode="M37"><axsl:apply-templates select="@*|*" mode="M37"/></axsl:template> |
| 305 |
|
| 306 |
|
| 307 |
|
| 308 |
|
| 309 |
|
| 310 |
<axsl:template match="xccdf:Benchmark[not(xccdf:platform)]" priority="1000" mode="M38"> |
| 311 |
|
| 312 |
|
| 313 |
<axsl:choose><axsl:when test="false()"/><axsl:otherwise>Warning: The 'Benchmark' element has no platform specified, which implies the benchmark applies to all platforms. Applicable platforms should be indicated if possible. See the XCCDF 1.2.1 specification, Section 6.2.5.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M38"/></axsl:template><axsl:template match="text()" priority="-1" mode="M38"/><axsl:template match="@*|node()" priority="-2" mode="M38"><axsl:apply-templates select="@*|*" mode="M38"/></axsl:template> |
| 314 |
|
| 315 |
|
| 316 |
|
| 317 |
|
| 318 |
|
| 319 |
<axsl:template match="xccdf:Benchmark[not(xccdf:description)]" priority="1000" mode="M39"> |
| 320 |
|
| 321 |
|
| 322 |
<axsl:choose><axsl:when test="false()"/><axsl:otherwise>Warning: A 'Benchmark' element should have at least one 'description' element. See the XCCDF 1.2.1 specification, Section 6.3.2.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M39"/></axsl:template><axsl:template match="text()" priority="-1" mode="M39"/><axsl:template match="@*|node()" priority="-2" mode="M39"><axsl:apply-templates select="@*|*" mode="M39"/></axsl:template> |
| 323 |
|
| 324 |
|
| 325 |
|
| 326 |
|
| 327 |
|
| 328 |
<axsl:template match="xccdf:Rule[xccdf:conflicts]/xccdf:conflicts|xccdf:Group[xccdf:conflicts]/xccdf:conflicts" priority="1000" mode="M40"><axsl:variable name="idref" select="@idref"/><axsl:variable name="parent_id" select="../@id"/> |
| 329 |
|
| 330 |
|
| 331 |
<axsl:choose><axsl:when test="./ancestor::xccdf:Benchmark/xccdf:Rule[not(@id = $parent_id) and @id = $idref]|./ancestor::xccdf:Benchmark/xccdf:Group[not(@id = $parent_id) and @id = $idref]"/><axsl:otherwise>Warning: The @idref attribute in a 'conflicts' element should match the @id attribute of a different 'Rule' or 'Group' element. See the XCCDF 1.2.1 specification, Section 6.4.1.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M40"/></axsl:template><axsl:template match="text()" priority="-1" mode="M40"/><axsl:template match="@*|node()" priority="-2" mode="M40"><axsl:apply-templates select="@*|*" mode="M40"/></axsl:template> |
| 332 |
|
| 333 |
|
| 334 |
|
| 335 |
|
| 336 |
|
| 337 |
<axsl:template match="xccdf:Profile[@note-tag]" priority="1000" mode="M41"><axsl:variable name="note_id" select="@note-tag"/> |
| 338 |
|
| 339 |
|
| 340 |
<axsl:choose><axsl:when test="./ancestor::xccdf:Benchmark/xccdf:Rule[xccdf:profile-note[@tag = $note_id]]"/><axsl:otherwise>Warning: The @note-tag attribute in a 'Profile' element should match the @tag attribute of a 'profile-note' element within a 'Rule' element. See the XCCDF 1.2.1 specification, Section 6.4.4.2.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M41"/></axsl:template><axsl:template match="text()" priority="-1" mode="M41"/><axsl:template match="@*|node()" priority="-2" mode="M41"><axsl:apply-templates select="@*|*" mode="M41"/></axsl:template> |
| 341 |
|
| 342 |
|
| 343 |
|
| 344 |
|
| 345 |
|
| 346 |
<axsl:template match="xccdf:Value[xccdf:match]" priority="1000" mode="M42"> |
| 347 |
|
| 348 |
|
| 349 |
<axsl:choose><axsl:when test="not(@type) or @type = 'string' or @type = 'number'"/><axsl:otherwise>Warning: The datatype of a 'Value' element should be 'string' or 'number' if there is a child 'match' element. See the XCCDF 1.2.1 specification, Section 6.4.5.2.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M42"/></axsl:template><axsl:template match="text()" priority="-1" mode="M42"/><axsl:template match="@*|node()" priority="-2" mode="M42"><axsl:apply-templates select="@*|*" mode="M42"/></axsl:template> |
| 350 |
|
| 351 |
|
| 352 |
|
| 353 |
|
| 354 |
|
| 355 |
<axsl:template match="xccdf:Value[xccdf:lower-bound|xccdf:upper-bound]" priority="1000" mode="M43"> |
| 356 |
|
| 357 |
|
| 358 |
<axsl:choose><axsl:when test="@type and @type = 'number'"/><axsl:otherwise>Warning: The datatype of a 'Value' element should be 'number' if there is a child 'lower-bound' or 'upper-bound' element. See the XCCDF 1.2.1 specification, Section 6.4.5.2.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M43"/></axsl:template><axsl:template match="text()" priority="-1" mode="M43"/><axsl:template match="@*|node()" priority="-2" mode="M43"><axsl:apply-templates select="@*|*" mode="M43"/></axsl:template> |
| 359 |
|
| 360 |
|
| 361 |
|
| 362 |
|
| 363 |
|
| 364 |
<axsl:template match="xccdf:Value[xccdf:value|xccdf:complex-value][count(xccdf:value[not(@selector) or @selector = '']|xccdf:complex-value[not(@selector) or @selector = '']) = 0]" priority="1000" mode="M44"> |
| 365 |
|
| 366 |
|
| 367 |
<axsl:choose><axsl:when test="false()"/><axsl:otherwise>Warning: All 'value' or 'complex-value' elements have non-empty @selector attribute values. The default selection will be the first of these elements. To explicitly designate a default, remove the selector of the default element. See the XCCDF 1.2.1 specification, Section 6.4.5.5.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M44"/></axsl:template><axsl:template match="text()" priority="-1" mode="M44"/><axsl:template match="@*|node()" priority="-2" mode="M44"><axsl:apply-templates select="@*|*" mode="M44"/></axsl:template> |
| 368 |
|
| 369 |
|
| 370 |
|
| 371 |
|
| 372 |
|
| 373 |
<axsl:template match="xccdf:Value[xccdf:default|xccdf:complex-default][count(xccdf:default[not(@selector) or @selector = '']|xccdf:complex-default[not(@selector) or @selector = '']) = 0]" priority="1000" mode="M45"> |
| 374 |
|
| 375 |
|
| 376 |
<axsl:choose><axsl:when test="false()"/><axsl:otherwise>Warning: All 'default' or 'complex-default' elements have non-empty @selector attribute values. The default selection will be the first of these elements. To explicitly designate a default, remove the selector of the default element. See the XCCDF 1.2.1 specification, Section 6.4.5.5.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M45"/></axsl:template><axsl:template match="text()" priority="-1" mode="M45"/><axsl:template match="@*|node()" priority="-2" mode="M45"><axsl:apply-templates select="@*|*" mode="M45"/></axsl:template> |
| 377 |
|
| 378 |
|
| 379 |
|
| 380 |
|
| 381 |
|
| 382 |
<axsl:template match="xccdf:Value[xccdf:match][count(xccdf:match[not(@selector) or @selector = '']) = 0]" priority="1000" mode="M46"> |
| 383 |
|
| 384 |
|
| 385 |
<axsl:choose><axsl:when test="false()"/><axsl:otherwise>Warning: All 'match' elements have non-empty @selector attribute values. This means that, by default, no 'match' element is used. To designate a default, remove the @selector from the desired default element. See the XCCDF 1.2.1 specification, Section 6.4.5.5.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M46"/></axsl:template><axsl:template match="text()" priority="-1" mode="M46"/><axsl:template match="@*|node()" priority="-2" mode="M46"><axsl:apply-templates select="@*|*" mode="M46"/></axsl:template> |
| 386 |
|
| 387 |
|
| 388 |
|
| 389 |
|
| 390 |
|
| 391 |
<axsl:template match="xccdf:Value[xccdf:lower-bound][count(xccdf:lower-bound[not(@selector) or @selector = '']) = 0]" priority="1000" mode="M47"> |
| 392 |
|
| 393 |
|
| 394 |
<axsl:choose><axsl:when test="false()"/><axsl:otherwise>Warning: All 'lower-bound' elements have non-empty @selector attribute values. This means that, by default, no 'lower-bound' element is used. To designate a default, remove the @selector from the desired default element. See the XCCDF 1.2.1 specification, Section 6.4.5.5..<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M47"/></axsl:template><axsl:template match="text()" priority="-1" mode="M47"/><axsl:template match="@*|node()" priority="-2" mode="M47"><axsl:apply-templates select="@*|*" mode="M47"/></axsl:template> |
| 395 |
|
| 396 |
|
| 397 |
|
| 398 |
|
| 399 |
|
| 400 |
<axsl:template match="xccdf:Value[xccdf:upper-bound][count(xccdf:upper-bound[not(@selector) or @selector = '']) = 0]" priority="1000" mode="M48"> |
| 401 |
|
| 402 |
|
| 403 |
<axsl:choose><axsl:when test="false()"/><axsl:otherwise>Warning: All 'upper-bound' elements have non-empty @selector attribute values. This means that, by default, no 'upper-bound' element is used. To designate a default, remove the @selector from the desired default element. See the XCCDF 1.2.1 specification, Section 6.4.5.5.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M48"/></axsl:template><axsl:template match="text()" priority="-1" mode="M48"/><axsl:template match="@*|node()" priority="-2" mode="M48"><axsl:apply-templates select="@*|*" mode="M48"/></axsl:template> |
| 404 |
|
| 405 |
|
| 406 |
|
| 407 |
|
| 408 |
|
| 409 |
<axsl:template match="xccdf:Value[xccdf:choices][count(xccdf:choices[not(@selector) or @selector = '']) = 0]" priority="1000" mode="M49"> |
| 410 |
|
| 411 |
|
| 412 |
<axsl:choose><axsl:when test="false()"/><axsl:otherwise>Warning: All 'choices' elements have non-empty @selector attribute values. This means that, by default, no 'choices' element is used. To designate a default, remove the @selector from the desired default element. See the XCCDF 1.2.1 specification, Section 6.4.5.5.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M49"/></axsl:template><axsl:template match="text()" priority="-1" mode="M49"/><axsl:template match="@*|node()" priority="-2" mode="M49"><axsl:apply-templates select="@*|*" mode="M49"/></axsl:template> |
| 413 |
|
| 414 |
|
| 415 |
|
| 416 |
|
| 417 |
|
| 418 |
<axsl:template match="xccdf:complex-check[xccdf:check[@multi-check = 'true']]/xccdf:check[@multi-check = 'true']" priority="1000" mode="M50"> |
| 419 |
|
| 420 |
|
| 421 |
<axsl:choose><axsl:when test="false()"/><axsl:otherwise>Warning: A 'check' element within a 'complex-check' element with its @multi-check attribute set to 'true' must be ignored by the tools. See the XCCDF 1.2.1 specification, Section 6.4.4.4.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M50"/></axsl:template><axsl:template match="text()" priority="-1" mode="M50"/><axsl:template match="@*|node()" priority="-2" mode="M50"><axsl:apply-templates select="@*|*" mode="M50"/></axsl:template> |
| 422 |
|
| 423 |
|
| 424 |
|
| 425 |
|
| 426 |
|
| 427 |
<axsl:template match="xccdf:Rule[xccdf:check][count(xccdf:check[not(@selector) or @selector = '']) = 0]" priority="1000" mode="M51"> |
| 428 |
|
| 429 |
|
| 430 |
<axsl:choose><axsl:when test="false()"/><axsl:otherwise>Warning: All 'check' elements have non-empty @selector attribute values. This means that, by default, no 'check' element is used. To designate a default, remove the @selector from the desired default element. See the XCCDF 1.2.1 specification, Section 6.4.4.4.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M51"/></axsl:template><axsl:template match="text()" priority="-1" mode="M51"/><axsl:template match="@*|node()" priority="-2" mode="M51"><axsl:apply-templates select="@*|*" mode="M51"/></axsl:template> |
| 431 |
|
| 432 |
|
| 433 |
|
| 434 |
|
| 435 |
|
| 436 |
<axsl:template match="xccdf:Value[not(xccdf:description|xccdf:question)]" priority="1000" mode="M52"> |
| 437 |
|
| 438 |
|
| 439 |
<axsl:choose><axsl:when test="false()"/><axsl:otherwise>Warning: A 'Value' element should contain at least one 'description' or 'question' element. See the XCCDF 1.2.1 specification, Section 6.4.5.4.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M52"/></axsl:template><axsl:template match="text()" priority="-1" mode="M52"/><axsl:template match="@*|node()" priority="-2" mode="M52"><axsl:apply-templates select="@*|*" mode="M52"/></axsl:template> |
| 440 |
|
| 441 |
|
| 442 |
|
| 443 |
|
| 444 |
|
| 445 |
<axsl:template match="xccdf:TestResult[not(@test-system)]" priority="1000" mode="M53"> |
| 446 |
|
| 447 |
|
| 448 |
<axsl:choose><axsl:when test="false()"/><axsl:otherwise>Warning: A 'TestResult' element should have a @test-system attribute. See the XCCDF 1.2.1 specification, Section 6.6.2.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M53"/></axsl:template><axsl:template match="text()" priority="-1" mode="M53"/><axsl:template match="@*|node()" priority="-2" mode="M53"><axsl:apply-templates select="@*|*" mode="M53"/></axsl:template> |
| 449 |
|
| 450 |
|
| 451 |
|
| 452 |
|
| 453 |
|
| 454 |
<axsl:template match="xccdf:TestResult/xccdf:rule-result" priority="1000" mode="M54"> |
| 455 |
|
| 456 |
|
| 457 |
<axsl:choose><axsl:when test="count(./xccdf:check|./xccdf:complex-check) = 1"/><axsl:otherwise>Warning: A 'rule-result' element should have exactly one child 'check' or 'complex-check' element. This is the conventional way of linking to the checking-system results for this Rule.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M54"/></axsl:template><axsl:template match="text()" priority="-1" mode="M54"/><axsl:template match="@*|node()" priority="-2" mode="M54"><axsl:apply-templates select="@*|*" mode="M54"/></axsl:template> |
| 458 |
|
| 459 |
|
| 460 |
|
| 461 |
|
| 462 |
|
| 463 |
<axsl:template match="xccdf:TestResult/xccdf:rule-result/xccdf:check" priority="1000" mode="M55"><axsl:variable name="selector" select="concat('',./@selector)"/><axsl:variable name="idref" select="../@idref"/> |
| 464 |
|
| 465 |
|
| 466 |
<axsl:choose><axsl:when test="./ancestor::xccdf:Benchmark//xccdf:Rule[@id=$idref]/xccdf:check[(@selector = $selector) or (not(@selector) and $selector = '')]"/><axsl:otherwise>Warning: A 'check' element within a 'TestResult/rule-result' element should have a matching @selector attribute as a 'check' element within the referenced 'Rule' element.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M55"/></axsl:template><axsl:template match="text()" priority="-1" mode="M55"/><axsl:template match="@*|node()" priority="-2" mode="M55"><axsl:apply-templates select="@*|*" mode="M55"/></axsl:template> |
| 467 |
|
| 468 |
|
| 469 |
|
| 470 |
|
| 471 |
|
| 472 |
<axsl:template match="xccdf:Group[@extends]" priority="1000" mode="M56"> |
| 473 |
|
| 474 |
|
| 475 |
<axsl:choose><axsl:when test="false()"/><axsl:otherwise>Warning: Deprecated attribute @extends found within 'Group' element. See the XCCDF 1.2.1 specification, Sections 6.4.1 and A.4.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M56"/></axsl:template><axsl:template match="text()" priority="-1" mode="M56"/><axsl:template match="@*|node()" priority="-2" mode="M56"><axsl:apply-templates select="@*|*" mode="M56"/></axsl:template> |
| 476 |
|
| 477 |
|
| 478 |
|
| 479 |
|
| 480 |
|
| 481 |
<axsl:template match="xccdf:Group[@abstract='true']" priority="1000" mode="M57"> |
| 482 |
|
| 483 |
|
| 484 |
<axsl:choose><axsl:when test="false()"/><axsl:otherwise>Warning: Deprecated behavior of @abstract attribute set to 'true' found within 'Group' element. See the XCCDF 1.2.1 specification, Sections 6.4.1 and A.4.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M57"/></axsl:template><axsl:template match="text()" priority="-1" mode="M57"/><axsl:template match="@*|node()" priority="-2" mode="M57"><axsl:apply-templates select="@*|*" mode="M57"/></axsl:template> |
| 485 |
|
| 486 |
|
| 487 |
|
| 488 |
|
| 489 |
|
| 490 |
<axsl:template match="xccdf:Rule[xccdf:impact-metric]" priority="1000" mode="M58"> |
| 491 |
|
| 492 |
|
| 493 |
<axsl:choose><axsl:when test="false()"/><axsl:otherwise>Warning: Deprecated 'impact-metric' element found within a 'Rule' element. See the XCCDF 1.2.1 specification, Sections 6.4.4.2 and A.4.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M58"/></axsl:template><axsl:template match="text()" priority="-1" mode="M58"/><axsl:template match="@*|node()" priority="-2" mode="M58"><axsl:apply-templates select="@*|*" mode="M58"/></axsl:template> |
| 494 |
|
| 495 |
|
| 496 |
|
| 497 |
|
| 498 |
|
| 499 |
<axsl:template match="xccdf:Tailoring/xccdf:Profile[@extends]" priority="1000" mode="M59"><axsl:variable name="extends_id" select="@extends"/><axsl:variable name="current_id" select="@id"/> |
| 500 |
|
| 501 |
|
| 502 |
<axsl:choose><axsl:when test="not(../xccdf:Profile[not(@id = $current_id)][@id = $extends_id])"/><axsl:otherwise>Error: A 'Profile' element within a 'Tailoring' element may not extend another 'Profile' in that 'Tailoring' element. See the XCCDF 1.2.1 specification, Section 6.7.3.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M59"/></axsl:template><axsl:template match="text()" priority="-1" mode="M59"/><axsl:template match="@*|node()" priority="-2" mode="M59"><axsl:apply-templates select="@*|*" mode="M59"/></axsl:template> |
| 503 |
|
| 504 |
|
| 505 |
|
| 506 |
|
| 507 |
|
| 508 |
<axsl:template match="xccdf:Tailoring/xccdf:Profile[@abstract='true']" priority="1000" mode="M60"> |
| 509 |
|
| 510 |
|
| 511 |
<axsl:choose><axsl:when test="false()"/><axsl:otherwise>Warning: 'Profiles' in 'Tailoring' elements may not be extended, so any declared abstract will never be used. See the XCCDF 1.2.1 specification, Section 6.7.2.<axsl:value-of select="string(' ')"/></axsl:otherwise></axsl:choose><axsl:apply-templates select="@*|*" mode="M60"/></axsl:template><axsl:template match="text()" priority="-1" mode="M60"/><axsl:template match="@*|node()" priority="-2" mode="M60"><axsl:apply-templates select="@*|*" mode="M60"/></axsl:template></axsl:stylesheet> |