[xep-support] "Filtered" Select and alternating background-color
baryza at intersystems.com
Thu May 25 09:29:15 PDT 2006
From the NIST dictionary:
Definition: A special form of recursion where the last operation of a
function is a recursive call. The recursion may be optimized away by
executing the call in the current stack frame and returning its result
rather than creating a new stack frame.
Substitute "template" for "function" and there you have it. When a
template ends with a direct invocation of itself, the processor can
reinitialize and reuse the stack frame. It doesn't have to push a new one.
At 11:41 AM 5/25/2006, you wrote:
> > tail recursion is optimized into a loop by many XSLT implementations,
> > SAXON and XT; thus the stack does not grow and iterative alogithms are
> > good when represented using recursion as if looping constructs were
>"tail recursion"? Is this a particular type of recursive call in XSLT,
>different from other types?
>If I have the following, what's happening on the stack to prevent
> <xsl:apply-templates select="foo"/>
> <p>Before recursive call...<xsl:value-of
> <xsl:apply-templates select="following-sibling::foo"/>
> <p>After recursive call...<xsl:value-of
>Doesn't the parser need to keep track of all the matches for <foo>, so
>it can spit out the "After..." stuff? If I have 300,000 <foo> elements
>to process, is there an issue?
>(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
>in the body of the message to majordomo at renderx.com from the address
>you are subscribed from.
>(*) By using the Service, you expressly agree to these Terms of Service
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo at renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html
More information about the Xep-support