[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

xsl:copy-reposting

Subject: xsl:copy-reposting
From: subbu@xxxxxxxxxxxx
Date: Thu, 08 Aug 2002 09:19:51 +0100
reposting
hello people.. Sorry for reposting...
following the suggestion given by Jeff and Mike,
I decided to go for the two-phase transformation..
I am stuck up in the very first phase :)
The following is my doubt.
I have the following xml with me..
<?xml version="1.0"?>
<students>
	<student id = "101">
		<name>A</name>
		<address>XXX</address>
	</student>
	<student id = "201">
		<name>B</name>
		<address>YYY</address>
	</student>
	<student id = "301">
		<name>C</name>
		<address>XXX</address>
	</student>
	<student id = "401">
		<name>E</name>
		<address>YYY<address>
	</student>
</students>

now what i have to do is .. convert this into an xml in such a way that if 
address is 'YYY' then add the same node again with a changed address ..
so what i want is after the

<student id = "201">
<name>B</name>
<address>YYY</address>
</student>

i want another Student Element Set which looks like

<student id = "201">
<name>B</name>
<address>Changed-YYY</address>
</student>

I looked at the archives came close to the solution but dint get what i 
wanted  :(...
the final transformed XML would look like ..

<students>
	<student id = "101">
		<name>A</name>
		<address>XXX</address>
	</student>
	<student id = "201">
		<name>B</name>
		<address>YYY</address>
	</student>
	<student id = "201">
		<name>B</name>
		<address>Changed-YYY</address>
	</student>
	<student id = "301">
		<name>C</name>
		<address>XXX</address>
	</student>
	<student id = "401">
		<name>E</name>
		<address>YYY<address>
	</student>
        <student id = "401">
		<name>E</name>
		<address>Changed-YYY<address>
	</student>
</students>

The Changed-YYY is something i read from a template passing YYY as parameter.
its a paramater ( $Changed-YYY)

I am sorry to trouble you .. but wud be happy if someone suggests me a way to 
come out of it
Thanx  a ton!!





--------------------------------------------------------------
Sent with "Me-Mail", Boltblue's FREE mobile messaging service.
http://www.boltblue.com


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.