Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: Removing child nodes via XSLT or Xpath - newbie question [Thread Next] Re: Removing child nodes via XSLT or Xpath - newbie questionTo: NULL Date: 10/4/2005 5:03:00 PM jhoge123@y... wrote: > Any idea how to make a simple XSLT file to rebuild an XML doc without a > particualar node type? Starting with the identity transformation <http://www.w3.org/TR/xslt#copying> is often helpful: <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> Then you simple add a template to not process a certain element at all e.g. <xsl:template match="product" /> or to only process its child nodes e.g. <xsl:template match="product"> <xsl:apply-templates /> </xsl:template> or you add a template doing some other stuff you want to do with that element. -- Martin Honnen http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
