[xsl] XSLT to Find/Replace Child Node

Subject: [xsl] XSLT to Find/Replace Child Node
From: "Morris, Chris" <ChrisM@xxxxxxxxxxxxxxxx>
Date: Tue, 16 Jan 2001 11:05:22 -0600
I have the following:

<Sample>
  <Level1>
    <OtherNode Attr="Value" />
    <ChildNode Attr="Value" />
  </Level1>
</Sample>

... and would like to replace all ChildNodes with a new structure:

<Sample>
  <Level1>
    <OtherNode Attr="Value" />
    <ChildNode>
      <NewNode Attr="Value" />
    </ChildNode>
  </Level1>
</Sample>

Is there anyway for me to transfer/copy the nodes I'm not interested in so I
only have to write a template for the ChildNode replacement?

Chris Morris
chrism@xxxxxxxxxxxxxxxx


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread