|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: jumps (gotos....) in xslt
"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
|
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
|

Cart








