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

Exit in XSLT: was jumps (gotos....) in xslt

Subject: Exit in XSLT: was jumps (gotos....) in xslt
From: "Smith, Brian BC " <BS185791@xxxxxxxxxxxxxxxx>
Date: Mon, 28 Jun 1999 08:26:09 -0500
xslt exit
Thanks for this reply.  I believe the syntax you are speaking of is now
xsl:call-templates and 
xsl:templates.  I am already using templatees, but this by itself dones not
solve the problem.  
However, in your example you
had an "Exit" statement.  this is exactly what I need, but it is not part of
the XSLT specification.
But I see nothing in the XLST spec for early termination.  I believe early
termination would be
a side-effect and therefore would not be allowed.  Is this correct?

So my question is can I end XSLT processing via an Exit statement of some
type?  Failing this
I still need a jump.  The call-templates return to the original line (method
call syntax).  and what
I need is something that does not return to original line.

Brian Smith


>
>It has been a while since I did anything with XSLT, but if I recall you
>might get some use out of xsl:invoke (for all I know the name of the tag
>may of changed) where you can in a sense "goto" a stylesheet defined
>macro.  So you could have:
>
><xsl:choose>
>  <!-- Error -->
>  <xsl:when test="foo">
>    <xsl:invoke macro="End">
>    <xsl:invoke>
>  </xsl:when>
></xsl:choose>
>
><xsl:macro name="End">
>  Exit
><xsl:macro>
>
>Forgive me if I am wrong on the actual syntax as I have not had much to do
>with XSL for about 6 months now.  Just trying to help.
>
>Tyler


>"Smith BC (Brian) at MSXSSC" wrote:
>> I have been using the XSL:choose for a while now and I find that I have
>> some complex nesting going on.   In some situations I would dearly
>> love to have a goto ID where the ID is used to identifier a jump point
>> with the XSL file (not the XML source).  I am aware that goto's are
>> usually not good form.  However, the classic "if error goto end" is
>> an example of where the goto is usually approved of, and I need it
>> for something similiar.
>>
>> Has anyone else been frustrated with complex nesting within XSLT?
>> If so, are there any options?  I have switched to an XSLT processor
>> so I can now use call-templates.  This helps improves clarity a great
>> deal, but it does not address the root of the problem.
>>
>> Brian Smith
>> Shell Services International






 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.