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

Re: xsl recursion

Subject: Re: xsl recursion
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Thu, 24 Feb 2005 07:06:16 +1100
xsl rowcount
The code you posted at comp.text.xml will really cause infinite recursion.

There is no correct stop condition. 

You test for 
         $rowcount = 2

but there isn't any test for 
        $rowcount = 1


If $rowcount = 1

then you divide it by 2 and get the next two calls with $rowcount = 0
and $rowcount = 1
and this goes on forever.


Cheers,
Dimitre Novatchev


On Thu, 24 Feb 2005 06:54:22 +1100, Dimitre Novatchev
<dnovatchev@xxxxxxxxx> wrote:
> > I need to use
> > a divide a conquer algorithm for parts of the document for comparing
> > previous node values (date differencing)
> > and building a stream of floating point values.
> 
> The code you provided doesn't contain any date differencing -- instead
> it just copies individual elements ???
> 
> Cross-posting to newsgroups will not help -- it is even more
> confusing, as you have provided different (although more meaningful)
> code in comp.text.xml
> 
> If one wants to be helped, he must respect the time of the people
> wanting to help, by providing the right (smallest possible information
> that still correctly describes the problem) data.
> 
> I suspect that you do not have a correct stop condition, which of
> course can't be proven until you have provided the real code.
> 
> One last node is that the DVC approach, when used correctly, reduces
> the maximum recursion depth and thus prevents typical stack overflow
> due to too-deep recursion. DVC, however, cannot help in other memory
> consumption problems.
> 
> Cheers,
> Dimitre Novatchev

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.