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
|
> 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
|