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

Re: Maximum recursion depth exceeded

Subject: Re: Maximum recursion depth exceeded
From: bryan rasmussen <rasmussen.bryan@xxxxxxxxx>
Date: Tue, 7 Jul 2009 15:41:27 +0200
Re:  Maximum recursion depth exceeded
On Tue, Jul 7, 2009 at 3:16 PM, Dimitre Novatchev<dnovatchev@xxxxxxxxx> wrote:
> On Tue, Jul 7, 2009 at 1:19 AM, bryan
> rasmussen<rasmussen.bryan@xxxxxxxxx> wrote:
>> On Tue, Jul 7, 2009 at 9:55 AM, Michael Kay<mike@xxxxxxxxxxxx> wrote:
>>>> anyway, recursion problems are likely to be a problem in .NET
>>>> / C#, as far as I know currently the only .NET language that
>>>> can compile and optimize for tail recursion is F#..
>>>
>>> Well, I know of at least two others: XSLT and XQuery, as implemented by
>>> Saxon.
>>>
>> I don't think those would be considered as .NET languages, those are
>> languages implemented in .NET. Sorry if I was imprecise earlier.
>>
>
> 1. Quite some of Bryan's statements about how "System.Xml.Xsl" does
> work are far from correct. One of them is that tail recursion is not
> supported. Tail recursion *is* optimized by XslCompiledTransform in
> non-debugging mode.
>
I never said that Tail recursion is not supported in XSLT or
system.xml.xsl. I said that the only .NET language I am aware of where
it is supported is F# - I'm not sure if I would consider an XSLT
compiled via XslCompiledTransform  to be a '.NET language' (I believe
I used the example of C#) , I haven't really thought about it though -
would you say it is?

> 2. To the original OP: The message by Saxon is generally presented
> whenever Saxon runs out of memory -- this may or maynot be caused by
> recursion stack overflow!

>
> To summarize: Prefer using DVC recursion to tail-recursion as a
> practical way to avoid the recursion stack overflow problem.

you're right of course, specifically as regards the practicality - but
it is annoying when I know I have a function that is properly tail
recursive and it overflows anyway...(This would be a C# problem, not
XSLT in System.XML.XSL)


Cheers,
Bryan Rasmussen

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-2007 All Rights Reserved.