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

RE: return?

Subject: RE: return?
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Thu, 27 Nov 2003 10:27:21 +0100
xsl terminate
> Hi,
>     Is possible in xslt use a return instruction when some 
> condition occur
>     and stop de verificaction  of  the remaining code
>     like this
>      <xsl:if test="string-length($str) <= 4>
>         (terminate verificaction) <xsl:return /> (?)
> </xsl:if>
> 

You can use <xsl:message terminate="yes"> to abort the whole
transformation, but you can't break out of a loop. That's because it's
undefined what the order of processing for a loop is: it might handle
all the nodes in the supplied node-set in parallel if it's clever
enough.

If you can't select the nodes you actually want to process up-front in
the select expression, then recurse over the nodes instead of iterating
over them.

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