xsl-list
[Top] [All Lists]

Re: remove certain elements but keep children

2004-10-04 02:18:45
Ben Munat wrote:

I'm trying to come up with an xpath or xsl template(s) that will remove the output tags, while leaving their child html and without producing duplicate content.

Changing something while preserving the rest is done using identity transformation:

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

<xsl:template select="output">
  <!-- Omit me -->
  <xsl:apply-templates select="node()"/>
</xsl:template>

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