[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Looking for an equivalent to recursion within a for lo
Dear List Members: I have run into a situation where I must increment a counter. This can be worked around using recursion and calling a template. However, I need to increment the counter while I iterate through a node-set. This would normally just be a matter of adding another parameter to the template call, but I have to increment the counter based on a condition while iterating through the node-set. The pseudo-code for this particular situation would be something like this: function process-list-conditionally(list L) { if (not-empty(L)) for-each(L) if (true) increment-counter otherwise counter } Does anyone have any suggestions for how this might be accomplished? I've found myself running into recursion within a for loop, which is not possible. Thanks for any suggestions. Erika end ------------ Gateway EDI, Inc. --------------------------------------------------------------------------------------------------- This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended addressee, or the person responsible for delivering it to them, you may not copy, forward, disclose or otherwise use it or any part of it in any way. To do so may be unlawful. If you receive this email by mistake, please advise the sender immediately and destroy all copies of the original message. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|