Re: [xsl] modifying elements value

Subject: Re: [xsl] modifying elements value
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 21 Jul 2004 15:47:15 -0400
Ajit,

This is a common requirement, and a FAQ. To do exactly what you're describing requires a simple stylesheet with two templates. The solution, with explanations, is documented at

http://www.dpawson.co.uk/xsl/sect2/identity.html

-- enjoy.

Cheers,
Wendell

At 12:51 PM 7/21/2004, you wrote:
I want to copy whole XML message as-is but want to modify only one
elements value to something else (in following example element <third>)

How can I do this using XSL

e.g.

<req>
        <first>123</first>
        <second>abc</second>
        <third>xyz</third>
        <forth>345</forth>
        <another_level>
                <element>12</element>
        <another_level>

</req>

to change to

<req>
        <first>123</first>
        <second>abc</second>
        <third>changed value</third>
        <forth>345</forth>
        <another_level>
                <element>12</element>
        <another_level>

</req>


======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================

Current Thread