| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
ík |
| 23 |
|
| 24 |
|
| 25 |
<xsl:stylesheet |
| 26 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
| 27 |
xmlns:xccdf_11="http://checklists.nist.gov/xccdf/1.1" |
| 28 |
version="1.0"> |
| 29 |
<xsl:output method="xml" indent="yes"/> |
| 30 |
|
| 31 |
<xsl:key name="values" match="//xccdf_11:Value" use="@id"/> |
| 32 |
|
| 33 |
<xsl:template match="@*|node()"> |
| 34 |
<xsl:copy> |
| 35 |
<xsl:apply-templates select="@*|node()"/> |
| 36 |
</xsl:copy> |
| 37 |
</xsl:template> |
| 38 |
|
| 39 |
<xsl:template match="xccdf_11:sub"> |
| 40 |
<xsl:variable name="idref" select="@idref"/> |
| 41 |
<xsl:choose> |
| 42 |
<xsl:when test="key('values', $idref)"> |
| 43 |
<xsl:element name="{local-name()}" namespace="{namespace-uri()}"> |
| 44 |
<xsl:apply-templates select="@*"/> |
| 45 |
<xsl:apply-templates/> |
| 46 |
</xsl:element> |
| 47 |
</xsl:when> |
| 48 |
<xsl:otherwise> |
| 49 |
<xsl:text>UNDEFINED_SUB</xsl:text> |
| 50 |
</xsl:otherwise> |
| 51 |
</xsl:choose> |
| 52 |
</xsl:template> |
| 53 |
</xsl:stylesheet> |
| 54 |
|