Subject: Re: [xsl] simulating for with foreach From: David Carlisle <davidc@xxxxxxxxx> Date: Wed, 5 Jul 2006 12:00:48 +0100 |
> Do I have to use <xsl:if test="position() mod 4 = 1", or in addition to the comments in the reply I just sent, you don't need to use xsl:if, just put it in a predicate in the select <xsl:for-each select="node[position() mod 4 = 1]"> it's usually preferable just to select the nodes you want rather than select everything and then use an xsl:if as then within the for-each position() goes in the sequence 1,2,3,4... numbering the items that are actually being selected, which is often useful. David
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] simulating for with forea, David Carlisle | Thread | Re: [xsl] simulating for with forea, Mohsen Saboorian |
Re: [xsl] simulating for with forea, David Carlisle | Date | RE: [xsl] simulating for with forea, Michael Kay |
Month |