On Wed, 30 Jan 2013 13:36:13 -0500
Gary Gapinski <[email protected]> wrote:

> On 01/30/2013 12:49 PM, Gary Gapinski wrote:
> I agree. There is nothing wrong with the usage.
> 
> 
> I was wrong.
> 
> See https://mail.gnome.org/archives/xslt/2012-September/msg00002.html and
> https://mail.gnome.org/archives/commits-list/2012-September/msg02486.html.
> 
> http://www.w3.org/TR/xslt#creating-attributes prohibits this.
> 
> http://www.w3.org/TR/xslt20/#creating-attributes says the same thing (I
> think), though with a lot more words.
> 
> Saxon 9 throws the same error.
> 
> The following avoids the error (however, the resulting file does not
> validate, but I think that's the case anyway).
> gapinski@gr2186815:~/Projects/scap-security-guide/RHEL6$ git diff diff --git
> a/RHEL6/transforms/shorthand2xccdf.xslt
> b/RHEL6/transforms/shorthand2xccdf.xslt index 507238e..59a0b53 100644 ---
> a/RHEL6/transforms/shorthand2xccdf.xslt +++
> b/RHEL6/transforms/shorthand2xccdf.xslt @@ -15,12 +15,9 @@
> exclude-result-prefixes="xccdf xhtml dc"> 
>    <!-- Content:template -->
>    <xsl:template match="Benchmark">
> -    <xsl:copy>
> -      <xsl:attribute name="xmlns">
> -        <xsl:text>http://checklists.nist.gov/xccdf/1.1</xsl:text>
> -      </xsl:attribute>
> +    <xsl:element name="Benchmark"
> namespace="http://checklists.nist.gov/xccdf/1.1";> <xsl:apply-templates
> select="@*|node()" />
> -    </xsl:copy>
> +    </xsl:element>
>    </xsl:template>
>  
>    <!-- insert current date -->
> gapinski@gr2186815:~/Projects/scap-security-guide/RHEL6$ 
> The template becomes just
>   <!-- Content:template -->
>   <xsl:template match="Benchmark">
>     <xsl:element name="Benchmark"
> namespace="http://checklists.nist.gov/xccdf/1.1";> <xsl:apply-templates
> select="@*|node()" /> </xsl:element>
>   </xsl:template>

Thanks!!  That worked like a charm!

-- 
Brian Millett
"If anyone asks, say it fell from the sky."
   -- [ Delenn to Sinclair (re: Vorlon files), "The Gathering"]
_______________________________________________
scap-security-guide mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/scap-security-guide

Reply via email to