[xsl] Altering specific value then outputing tree.

Subject: [xsl] Altering specific value then outputing tree.
From: mmackay@xxxxxxxxxxx
Date: Wed, 11 Jul 2001 17:28:06 +0100
*********************************************************************
*                     Scottish Equitable plc                        *
*      Registered Office: Edinburgh Park, Edinburgh EH12 9SE.       *
*           Regulated by the Personal Investment Authority.         *
*         A member of the Scottish Equitable Marketing Group.       *
*********************************************************************


Hi

I am wondering if anyone can help.  I maybe have overlooked an easy way of
doing what I want.  Say I have a piece of XML:

 <person id="pc1">
  <title>Miss</title>
  <forenames>La</forenames>
  <surname>La</surname>
  <sex>Female</sex>
  <marital_status>Married</marital_status>
  <date_of_birth>1960-11-04</date_of_birth>
  <home_address id="ad1">
   <line1>TellyTubbyStreet</line1>
   <line2>Lala land</line2>
   <country>Scotland</country>
   <postcode>EH35 2LH</postcode>
  </home_address>
  <employment_status>Employed</employment_status>
  <applicant>
   <member_number/>
  </applicant>
  <national_insurance_number>LL234567T</national_insurance_number
>
  <retirement_age>60</retirement_age>
 </person>

I want to be able to output the above piece of XML in my output document, and I
can do this fine by doing an <xsl:copy-of select="//person"/> but I want to be
able to change the value of the member_number tag before outputing the above so
that it contains a number.  I am going to get the value for the member_number
from elsewhere within my XML document.  Is there an easy way of doing this
rather than a <xsl:copy-of..> of each individual element within the above
tree??

Thanx in advance for any help.

Mo

______________________________________________________________________
                           EMAIL DISCLAIMER

This message is for the intended recipient only. It may contain confidential
or proprietary information. If you receive this message in error, please
immediately delete it, destroy all copies of it and notify the sender.
You must not use or disclose any part of this message if you are not the
intended recipient. We may monitor all Email communication through our
networks.

If you contact us by Email, we may store your name and address to
facilitate communication.

Any views expressed in this message are those of the individual sender,
except where the message states otherwise.

We take reasonable precautions to ensure our Emails are virus free.
However, we cannot accept responsibility for any virus transmitted by us
and recommend that you subject any incoming Email to your own virus
checking procedures.

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


Current Thread