Subject: Re: [xsl] Using xsl:for-each for every 2 elements ? From: Mukul Gandhi <mukul_gandhi@xxxxxxxxx> Date: Mon, 30 May 2005 22:18:42 -0700 (PDT) |
Hi Ahsan, Please try this XSL, for processing every two elements .. <xsl:for-each select="//*[(position() mod 2) = 0]"> <!-- Processing you wish --> </xsl:for-each> Regards, Mukul --- Ahsan Ali <doubleletter@xxxxxxxxx> wrote: > 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 > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Using xsl:for-each for ev, Juergen | Thread | Re: [xsl] Using xsl:for-each for ev, Ahsan Ali |
[xsl] Testing, Johny_Simamora | Date | Re: [xsl] Using xsl:for-each for ev, Ahsan Ali |
Month |