xsl-list
[Top] [All Lists]

Re: remove certain elements but keep children

2004-10-04 11:35:22
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