xsl-list
[Top] [All Lists]

Re: [xsl] What's your visual metaphor for XSL Transformations?

2007-03-24 12:04:12
Mukul Gandhi wrote:

  Hi

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.

  I think this is pretty true for the general case.  One well-known
exception to this (there are maybe others, but I don't know them) is
the tail-recursion.

  If the recursive call of your recursive function (or template, or
method or whatever) is at the very end of the function's body, there is
an optimisation opportunity.  The processor can reuse the stackframe
instead of pushing a new one at the top of the stack (depending maybe
on some rewritings of the code, I don't know).

  Regards,

--drkm





















        

        
                
___________________________________________________________________________ 
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur 
Yahoo! Questions/Réponses 
http://fr.answers.yahoo.com

--~------------------------------------------------------------------
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>
--~--