Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - How to delete a parent node and move the child node(s) up the tree >Thread Next - Re: How to delete a parent node and move the child node(s) up the tree Re: How to delete a parent node and move the child node(s) up the treeTo: NULL Date: 5/1/2007 1:35:00 PM CI wrote:
> I want to get rid off <specialRow> element and move all its child
> nodes into its place.
That is easy if you start with the identity transformation template and
add a template for specialRow that simply processes its child nodes:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="specialRow">
<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>
If you want to correct the indentation then adding
<xsl:strip-space elements="*"/>
<xsl:output method="xml" indent="yes"/>
should help.
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
