[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] recursion troubles --Xalan, Saxon, msxml, xt --


Subject: [xsl] recursion troubles --Xalan, Saxon, msxml, xt --
From: Eric Vermetten <EVermetten@xxxxxxxxxxxxx>
Date: Mon, 12 Feb 2001 21:28:14 -0000

Hello all,
This maybe something more on the implementation side of
XSLT, but it applies to several different XSLT products.

I have the following 2 files:

<!--++++____ t.xsl ____++++-->
<?xml version="1.0"?> 
<xsl:stylesheet 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml"/>

  <xsl:template match="/">
	<xsl:element name="wrap" >
		<xsl:apply-templates />
	</xsl:element>
  </xsl:template>

<xsl:template name="reverse">
   <xsl:param name="index" />

    <xsl:if test="$index != 0">
        <xsl:call-template name="reverse">
           <xsl:with-param name="index" select="$index - 1" />
        </xsl:call-template>
        <xsl:value-of select="concat($index,'|')" />
    </xsl:if>
</xsl:template>

<xsl:template match="text()">
   <xsl:call-template name="reverse">
      <xsl:with-param name="index" select="string-length(.)"/>
   </xsl:call-template>
</xsl:template>
</xsl:stylesheet>

<!--++++____ t.xml ____++++-->
<?xml version="1.0"?>
<wrap><a>01234567890123456789</a></wrap>

The number of characters in the content of the a element
is put in the first column.

Instant Saxon 6.0.2.
1-251     correct output
252       *no* output: the NT command line just silently reappears
253       java.lang.StackOverflowError
254       *no* output: the NT command line just silently reappears
255,256   java.lang.StackOverflowError
      --this is were I stopped
Bug for 252 and 254?

Xalan 1.2.2.
1-859     correct output
860       EXCEPTION_STACK_OVERFLOW exception
861       HotSpot Virtual Machine Error, EXCEPTION_STACK_OVERFLOW
          suggests making a bug report (which I did)
862       EXCEPTION_STACK_OVERFLOW exception,
      --this is where I stopped
Bug for 861

msxml prod release  -no evil empires here-
1 - 4000  correct output

xt, xt.dll from XMetal 1.0
1 - 4000  corect output

Why are those Java based processors having such a hard time
with keeping their runtime stack in order? Why is there such
a big difference between instant Saxon and Xalan? Both are 
java based. Shouldn't the runtime stack space only be limited 
by available memory? Can someone give me some explanation?

Thanks in advance,
Eric Vermetten


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
Keywords