Sorry I am joining a bit late into this thread. Lot of good things
have already been said about recursion.
I think recursion is implemented (by compiler / interpreter / or, XSLT
processor) using some kind of stack.
1) Each time a method is called, the method is pushed on the stack.
2) Each time the method returns, the method is popped off the stack.
3) If a method calls itself recursively, another copy of the method is
pushed onto the stack.
If you understand how stack works, you can easily visualize recursion.
On 3/22/07, Rashmi Rubdi <rashmi(_dot_)sub(_at_)gmail(_dot_)com> wrote:
Nice post.
It would be interesting to know how a recursive template could be visualized.
A few days ago I posted a request on this list to create an HTML menu
in the form of ul , li tags recursively. I found it tough to visualize
the answer that was posted.
I used to write a lot of recursive functions in C , but have now
forgotten all about recursion since I didn't use it since school.
I plan to read this: http://en.wikipedia.org/wiki/Recursion carefully
to remember it again, I think it is useful to know especially in XSLT.
-Rashmi
--
Regards,
Mukul Gandhi
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--