Re: [xsl] remove certain elements but keep children

Subject: Re: [xsl] remove certain elements but keep children
From: Oleg Tkachenko <oleg@xxxxxxxxxxxxx>
Date: Mon, 04 Oct 2004 20:35:22 +0200
Ben Munat wrote:

    <xsl:template match="*">
      <xsl:copy><xsl:copy-of select="@*|node()"/>
         <xsl:apply-templates/>
      </xsl:copy>
    </xsl:template>

This is weird. You are copying every child node and then process them again. Use standard identity transformation:


<xsl:template match="@*|node()">
  <xsl:copy>
    <xsl:apply-templates select="@*|node()"/>
  </xsl:copy>
</xsl:template>

--
Oleg Tkachenko
http://blog.tkachenko.com
Multiconn Technologies, Israel
Current Thread