Re: [xsl] flattening an xml hierarchy

Subject: Re: [xsl] flattening an xml hierarchy
From: Tim <timlhunt@xxxxxxxxxxxxxx>
Date: Thu, 08 Jan 2009 12:34:21 -0500
I thought a simple example would be able for me to extrapolate to one with namespaces. When I run your transform with
<xsl:template match="GetNextDocumentResponse | GetNextDocumentResult | Document">
<xsl:template match="Dontwant1 | dontwant2">

I get the unwanted elements as well.

I am looking to remove the top three elements of the below [accurate] example:
<GetNextDocumentResponse xmlns="";>
<EquipmentStatusDocument xmlns="urn:x12:schemas:BEX200808:StatusDocuments">

Thanks, again.

Martin Honnen wrote:
Tim wrote:

I'd like to remove some elements from an xml hierachy using xslt:

Original xml example:
       <y5>more stuff</y5>

Like to have transform output:
   <y5>more stuff</y5>

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

  <xsl:template match="Dontwant1 | dontwant2">
     <xsl:apply-templates select="*"/>

Current Thread