Using xsl:for-each for every 2 elements ?
I mean, could you give me an example of how to co-relate elements in the two arrays ? Regards, Ahsan ---------- Forwarded message ---------- From: Ahsan Ali <doubleletter@xxxxxxxxx> Date: May 31, 2005 9:38 AM Subject: Re: Using xsl:for-each for every 2 elements ? To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx I'm afraid I don't follow.. could you kindly give me an example ? Regards, Ahsan On 5/31/05, Juergen <xsl@xxxxxxxxxxxxxxx> wrote: > Hi Ahsan, > > why not try recursion. > Variable flights with nodes flights/flt. > Variable Availability with nodes availability/avail. > Then process the beginning of the (corresponding) nodeset > and call yourself with the rest of the nodeset. > > Cheers, > > Juergen > > ----- Original Message ----- > From: "Ahsan Ali" <doubleletter@xxxxxxxxx> > To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> > Sent: Tuesday, May 31, 2005 7:07 AM > Subject: Using xsl:for-each for every 2 elements ? > > > Hi, > > Is it possible to use xsl:for-each for every two elements ? > > E.g > ---------- > <data> > <flights> > <flt>onward</flt> > <flt>return</flt> > <flt>onward</flt> > <flt>return</flt> > </flights> > > <availability> > <avail>N</avail> > <avail>Y</avail> > <avail>N</avail> > <avail>Y</avail> > </availability> > > </data> > -------- > The second part of the problem is that, the above have to be > iterated/grouped using a method that would still allow me to somehow > co-relate the first <avail> in <availability> with the first <flt> in > <flights>. That's my second question.. how to co-relate that since > their in the same level of hierarchy ?? > > Thanks, > > Ahsan
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