[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: simulating for with foreach
> but there are situations in which you can not use > position() because it doesn't give you the exact node (for example > when you have #text elements randomly beside <node>. If you only want to iterate over elements, just select elements not text nodes, then position() will give the position in the sequence of selected items. <xsl:for-each seelct="node[position() mod 2 =1]" does what you want, I think. David
|
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
|