|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: transforming flat data to hierarchical data. Recur
Hi, Did you already look at grouping: http://www.jenitennison.com/xslt/grouping/index.html Cheers, Agnes ----- Original Message ----- From: "dave peeters" <elechi76@xxxxxxxxxxx> To: <XSL-List@xxxxxxxxxxxxxxxxxxxxxx> Sent: Friday, June 06, 2003 9:39 AM Subject: transforming flat data to hierarchical data. Recursion?? > I'm having the following structure in an XML file > > ... > <Pages> > <PAGE id="1"> > ... > <Next id="2"/> > </PAGE> > <PAGE id="2"> > ... > <Next id="3"/> > </PAGE> > <PAGE id="3"> > ... > </PAGE> > <PAGE id="4"> > ... > <Next id="5"/> > </PAGE> > <PAGE id="5"> > ... > </PAGE> > ... > </Pages> > ... > > And need to get to the following > ... > <Pages> > <PAGE id="1"> > ... > <Next> > <PAGE id="2"> > ... > <Next> > <PAGE id="3"> > ... > </PAGE> > </Next> > </PAGE> > </Next> > </PAGE> > <PAGE id="4"> > ... > <Next> > <PAGE id="5"> > ... > </PAGE> > </Next> > </PAGE> > </Pages> > ... > > I think I need to use recursion but I cannot get the output I want. > I tried replacing every /Next/@id with its matching element using a xsl:key > on the PAGE elements based on id > but that only replaces on one level and since I don't know the lenght of the > linked lists I cannot use this principle. > > Does anybody have an idea how to solve this > I'm not really that familiar with xslt > > Kind regards > Dave > > _________________________________________________________________ > Hotmail: je gratis e-mail ! http://www.msn.be/hotmail > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








