Senthilukvelaan wrote:
Hi ,
I am using the following identity transform and I want to remove the
<ns2:local xmlns:ns2="uri"> which might occur in my input xml. How do
I remove this node?
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="*">
<xsl:element name="{name(.)}">
<xsl:apply-templates select="@*|node()"/>
</xsl:element>
</xsl:template>
Well
<xsl:template match="ns2:local"
xmlns:ns2="uri"/>
removes the element and its content while
<xsl:template match="ns2:local"
xmlns:ns2="uri">
<xsl:apply-templates/>
</xsl:template>
strips the element but copies its content.
--
Martin Honnen --- MVP Data Platform Development
http://msmvps.com/blogs/martin_honnen/
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--