[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Break a for-each

Subject: Re: Break a for-each
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Mon, 20 Aug 2001 03:53:14 -0700 (PDT)
for each break
> My problem is as follows :
> - If I find the subsetName in the first CurrentAuthentified how can I break the 
> loop ?
> 

You can't "break" from a xsl:for-each (except with a 'xsl:message terminate="yes"',
which you obviously do not want to do).

This is because you cannot rely on the ordering of execution (or even its being
executed sequentially in any order!) of the body of an xsl:for-each.

The solution is:

 - briefly: (serialise/)convert the xsl:for-each loop into a recursive template and
return (do not call yourself) as soon as the break condition becomes true.

 - with more detail: 
http://www.vbxml.com/snippetcentral/main.asp?view=viewsnippet&id=v20010228100123


Hope this helped.

Cheers,
Dimitre Novatchev.




__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

 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.