A
Andre-John Mas
Hi,
I have some code that looks as follows:
<xsl:for-each select="$pageMetaData/*">
<xsl:choose>
<xsl:when test="local-name() = 'meta'">
<xsl:copy-of select="."/>
</xsl:when>
<xsltherwise>
<meta content="{.}" name="{local-name()}"/>
</xsltherwise>
</xsl:choose>
</xsl:for-each>
The problem is that it copies the namespace when it does so (it
appears to be implied, rather than declared). So this:
<meta content="abc" name="dc.creator"/>
becomes this in the final output:
<meta xmlns="http://www.myco.com/datalist" content="yuri"
name="dc.creator"/>
How do I copy the element and not have the namespace in the result?
Note that I only want to apply this here, and not globaly to all
cases.
Andre
I have some code that looks as follows:
<xsl:for-each select="$pageMetaData/*">
<xsl:choose>
<xsl:when test="local-name() = 'meta'">
<xsl:copy-of select="."/>
</xsl:when>
<xsltherwise>
<meta content="{.}" name="{local-name()}"/>
</xsltherwise>
</xsl:choose>
</xsl:for-each>
The problem is that it copies the namespace when it does so (it
appears to be implied, rather than declared). So this:
<meta content="abc" name="dc.creator"/>
becomes this in the final output:
<meta xmlns="http://www.myco.com/datalist" content="yuri"
name="dc.creator"/>
How do I copy the element and not have the namespace in the result?
Note that I only want to apply this here, and not globaly to all
cases.
Andre