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

RE: variable handling

Subject: RE: variable handling
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Wed, 2 Oct 2002 11:10:54 +0100
xslt variable handling
> I dont know what should be the appropriate title for this 
> problem of mine.

The appropriate title would be "grouping" and the solution can be found
in XSLT textbooks under "grouping" or more specifically "Muenchian
grouping". Check http://www.jenitennison.com/xslt/grouping

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 


> 
> <?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
> 


 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.