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

Re: jumps (gotos....) in xslt

Subject: Re: jumps (gotos....) in xslt
From: Tyler Baker <tyler@xxxxxxxxxxx>
Date: Fri, 25 Jun 1999 12:42:59 -0400
gotos
"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

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


 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.