Re: Implementing recursion (Was Re: Char node-type)

Subject: Re: Implementing recursion (Was Re: Char node-type)
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Fri, 24 Nov 2000 03:56:06 -0800 (PST)

The binary cut algorithm was needed to optimise (mimnimise the number
of) the recursive calls processing.

The meaning of my message is not to use binary cut at all -- it is
meaningless to optimise a problem one knows is eliminated...

I only know about Saxon and MSXML  -- I remember that Mike Kay
confirmed in this mailing list not too long ago that SAXON recognised
tail recursion and implemented it via iteration.

Then someone was complaining about crashes of MSXML when processing
recursive transformations -- so I gave it a test and also tested SAXON

Probably other people will provide information about other popular XSLT

Dimitre Novatchev.

David Carlisle wrote:
> Will it not be simpler just to use SAXON -- it recognises tail
> recursion and implements it using iteration -- therefore no stack
> overflow will occur.

But a good question is the algorithm in question tail recursive?
If it's doing a binary cut and processing each branch with two
calls then, it isn't...


> In my opinion there must be some requirements in the standard
> specifications about the minimum expected robustness and reliability
> an XSLT processor. A good and necessary requirement of this type is
> that an XSLT processor should not crash in typical recursive
> processing.

If I recall, scheme (and XSL's parent, DSSSL) mandate that
implementations perform tail recursion elimination. XSLT of course
hardly mandates anything about implementaions at all.
However it would be good to know if the common implementations
do do this, you said saxon does, what of the others?


Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.

 XSL-List info and archive:

Current Thread