Subject: Re: [xsl] Remove identity Transform <ns2:local xmlns:ns2="uri"> From: Martin Honnen <Martin.Honnen@xxxxxx> Date: Mon, 07 May 2012 14:55:19 +0200 |
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/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Remove identity Transform <ns, Senthilukvelaan | Thread | Re: [xsl] Remove identity Transform, ihe onwuka |
[xsl] Remove identity Transform <ns, Senthilukvelaan | Date | Re: [xsl] Remove identity Transform, ihe onwuka |
Month |