RE: How Can You Exit an xsl:for-each Loop Prematurely?
> 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
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