Subject: Re: [xsl] Using xsl:for-each for every 2 elements ? From: "Juergen" <xsl@xxxxxxxxxxxxxxx> Date: Tue, 31 May 2005 08:10:25 +0200 |
sorry, variables in template calls are called parameter. Assuming you are in <data>. Code not tested
<xsl:call-template name="Loop"> <xsl:with-param name="Flights" select="flights/flt"/> <xsl:with-param name="Availibility" select="availability/avail"/> </xsl:call-template>
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: [xsl] 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Using xsl:for-each for every , Ahsan Ali | Thread | Re: [xsl] Using xsl:for-each for ev, Mukul Gandhi |
[xsl] Using xsl:for-each for every , Ahsan Ali | Date | RE: [xsl] Text to appear on each pa, Jarno.Elovirta |
Month |