xsl-list
[Top] [All Lists]

RE: [xsl] Iteration without nodes

2006-07-26 07:53:23

From: "Frank Daly" <Frank(_dot_)Daly(_at_)cit(_dot_)ie>

Hi

I've successfully used the expression <xsl:for-each
select="fieldcount[position() &lt; $lastNo]"> to perform a certain
operation a number of times.  I'm not sure where I got it and can't find
information on why it works.  Now I'm doing a slightly different
stylesheet and I can't get the desired result.  Could someone explain
how this operation works.


Sounds like a horrible bodge to me.

What the code actually does is to iterate over the first ($lastNo - 1) fieldcount children
of the context node.

If there happen to be at least ($lastNo - 1) of them, then is is equivalent to performing the body
of the for-each loop ($lastNo - 1) times. otherwise it is not.

_________________________________________________________________
Be the first to hear what's new at MSN - sign up to our free newsletters! http://www.msn.co.uk/newsletters


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>