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

RE: How Can You Exit an xsl:for-each Loop Prematurely?

Subject: RE: How Can You Exit an xsl:for-each Loop Prematurely?
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Fri, 24 Sep 1999 09:52:39 +0100
xsl terminate for each loop
> The actual transformation is to see if any CODE attribute in 
> the METADATA matches any SupCat in the StringMap and if it does then 
> output the iCat value.
> 
> BUT I want to output only one match, i.e., if there is more 
> than one match (as
> in this case GB and ODD both match) I want only one of them.

I haven't looked at your example in detail but there is always the option of
a recursive solution as an alternative to iteration. It's easy to terminate
a recursion wherever you want. The only caveat is that it may have
n-squared-over-2 performance as each step in the recursion evaluates the
node set anew.

Mike Kay


 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.