RE: [xep-support] "Filtered" Select and alternating background-color

From: Powell, Todd <Todd.Powell@hq.doe.gov>
Date: Thu May 25 2006 - 08:41:04 PDT

Hi David,

> tail recursion is optimized into a loop by many XSLT implementations,
e.g.
> SAXON and XT; thus the stack does not grow and iterative alogithms are
as
> good when represented using recursion as if looping constructs were
used.

"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
stack-space issues?

<xsl:template match="ROOT">
        <xsl:apply-templates select="foo[1]"/>
</xsl:template>

<xsl:template match="foo">
        <p>Before recursive call...<xsl:value-of
select="position()"/></p>

        <xsl:apply-templates select="following-sibling::foo"/>

        <p>After recursive call...<xsl:value-of
select="position()"/></p>
        ...
        ...
</xsl:template>

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?

- Todd

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@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
Received on Thu May 25 09:18:32 2006

This archive was generated by hypermail 2.1.8 : Thu May 25 2006 - 09:18:33 PDT