Advertisement

05.07.2008 at 06:02PM PDT, ID: 23384752
[x]
Attachment Details

remove a node with certain attribute ...

Asked by meow00 in Extensible Stylesheet Language Transformation (XSLT)

Tags: xslt

Hi experts,

I am trying to remove some node, for example:

<Zoo location="LA" >
   <Animal name = "dog" />
   <Animal name = "cat" />

  <Extention name = "Hello" />
  <Extention name = "Hi" />
</Zoo>

------------------------------
I want the output to be:


<Zoo location="LA" >
   <Animal name = "dog" />
   <Animal name = "cat" />

  <Extention name = "Hello" />
</Zoo>

------------------------------
I tried to used the following, but it didn't work ...

 <xsl:template match="node()">
        <xsl:copy>
            <xsl:copy-of select="@*" />
            <xsl:apply-templates select="node()[not(name() = 'Hi')] " />
        </xsl:copy>
    </xsl:template>
    -----------------------------
Can anyone please give me some helps? Thanks!Start Free Trial
[+][-]05.07.2008 at 11:40PM PDT, ID: 21522719

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.07.2008 at 11:42PM PDT, ID: 21522729

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Extensible Stylesheet Language Transformation (XSLT)
Tags: xslt
Sign Up Now!
Solution Provided By: Gertone
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628