Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: 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 treeTo: NULL Date: 5/1/2007 10:38:00 PM On May 1, 4:35 am, Martin Honnen <mahotr...@yahoo.de> wrote: > 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/ Thank you very much Martin. Michael | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
