This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
variable handling
- From: "Anita Sood" <anita_sood_77 at hotmail dot com>
- To: XSL-List at lists dot mulberrytech dot com
- Date: Tue, 01 Oct 2002 18:31:03 +0000
- Subject: [xsl] variable handling
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi,
I dont know what should be the appropriate title for this problem of mine. I
am not an oldie in XSLT :-(. Anyway, I will come to my problem. I got an XML
file as shown below.
<?xml version="1.0" encoding="UTF-8"?>
<TeamInfo>
<row>
<team>1 </team>
<teamName>First Team</teamName>
<name>Vinod</name>
</row>
<row>
<team>1 </team>
<teamName>First Team </teamName>
<name>Kavita</name>
</row>
<row>
<team>2 </team>
<teamName>Second Team </teamName>
<name>Suren</name>
</row>
<row>
<team>2 </team>
<teamName>Second Team </teamName>
<name>Amit</name>
</row>
<row>
<team>3 </team>
<teamName>Third Team </teamName>
<name>Shilpa</name>
</row>
</TeamInfo>
I want to convert it into something like this
<teams>
<team number="1" name="First Team">
<member> Vinod </member>
<member> Kavita </member>
</team>
<team number="2" name="Second Team">
<member> Suren </member>
<member> Amit </member>
</team>
<team number="3" name="Third Team">
<member> Shilpa </member>
</team>
</teams>
Please note that there can be n number of teams with m members in each team.
I had an XSLT code but the rigidity of variables(they are all of type final,
plz plz someone say that I am wrong) is coming in between. I dont want to
bias any of you experts with my code. Plz plz plz reply at the earliest.
Anita
_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list