[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

Subject: Looking for an equivalent to recursion within a for loop
From: Erika Marlow <EMarlow@xxxxxxxxxxxxxx>
Date: Fri, 30 May 2003 16:21:33 -0500
recursion within recursion
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.