The problem template is for row. I'll be trying it outside of ss to see what I get.
 
<xsl:template match="row">
  <xsl:param name="spans"/>
  <xsl:variable name="rownum"><xsl:number count="row" level="single"/></xsl:variable>
  <xsl:variable name="spans">
    <xsl:choose>
        <xsl:when test="$rownum = 1">
            <xsl:call-template name="blank.spans">
              <xsl:with-param name="cols" select="../@cols"/>
            </xsl:call-template>
        </xsl:when>
        <xsl:otherwise>
          <xsl:apply-templates select="entry[1]" mode="span">
            <xsl:with-param name="spans" select="$spans"/>
          </xsl:apply-templates>
        </xsl:otherwise>
    </xsl:choose>
  </xsl:variable>
  <tr>
    <xsl:if test="$table.borders.with.css != 0">
      <xsl:if test="@rowsep = 1">
        <xsl:attribute name="style">
          <xsl:call-template name="border">
            <xsl:with-param name="side" select="'bottom'"/>
          </xsl:call-template>
        </xsl:attribute>
      </xsl:if>
    </xsl:if>

    <xsl:if test="@align">
      <xsl:attribute name="align">
        <xsl:value-of select="@align"/>
      </xsl:attribute>
    </xsl:if>
    <xsl:if test="@char">
      <xsl:attribute name="char">
        <xsl:value-of select="@char"/>
      </xsl:attribute>
    </xsl:if>
    <xsl:if test="@charoff">
      <xsl:attribute name="charoff">
        <xsl:value-of select="@charoff"/>
      </xsl:attribute>
    </xsl:if>
    <xsl:if test="@valign">
      <xsl:attribute name="valign">
        <xsl:value-of select="@valign"/>
      </xsl:attribute>
    </xsl:if>

    <xsl:apply-templates select="entry[1]">
      <xsl:with-param name="spans" select="$spans"/>
    </xsl:apply-templates>
  </tr>

  <xsl:if test="following-sibling::row">
    <xsl:variable name="nextspans">
      <xsl:apply-templates select="entry[1]" mode="span">
        <xsl:with-param name="spans" select="$spans"/>
      </xsl:apply-templates>
    </xsl:variable>
    <xsl:apply-templates select="following-sibling::row[1]">
      <xsl:with-param name="spans" select="$nextspans"/>
    </xsl:apply-templates>
  </xsl:if>
<
/xsl:template>


From: Michael Kay [mailto:mike@saxonica.com]
Sent: Monday, February 23, 2009 12:32 PM
To: 'Mailing list for the SAXON XSLT and XQuery processor'
Subject: Re: [saxon] Setting Maximum recursion depth

I'm not sure these Stylus Studio settings have any effect when using Saxon as the XSLT processor.
 
It's possible though (I'm not sure) that tail recursion optimization is switched off when in a tracing/debugging environment, so if you are running in an IDE, it's probably worth checking it from the command line.
 
It would be also a good idea to post the relevant code fragments here (that is, the recursive template) so we can see whether tail recursion ought to be kicking in. The -explain output will also help here.
 
Michael Kay


From: Waters, Michael, Springer US [mailto:Mike.Waters@springer.com]
Sent: 23 February 2009 16:40
To: Mailing list for the SAXON XSLT and XQuery processor
Subject: Re: [saxon] Setting Maximum recursion depth

I don’t have Stylus Studio installed anymore, but I had the same problem a while ago, i.e., a table with a few columns, but thousands of rows. >From what I remember, there were some settings in Stylus Studio you can try.

 

From their Developer forum:

 

“Im doing an XSL conversion of data exported from a CSV file. The XML file is approximately 11MB with over 11,000 rows of data. I keep getting the error that "XSLT processor has exceeded the maximum recursion depth".

I have tried maxing ouot the Maximum recursion level to high as well as disabling infinite loop detection. Are there any workarounds for large file conversion support?”

 

A solution that worked for a user:

 

“It looks like you are hitting a bug; the value of "Enable infinite loop detection" option doesn't seem to be honored.

For the time being, you can workaround the problem setting a very high value for the maximum recursion level directly in the registry, like, for example:

[HKEY_CURRENT_USER\Software\Stylus Studio\2008 XML Enterprise Suite Release 2\Plugin Settings]
"XSLT Editor: Option: RecursionLevel"=dword:00010000

(the correct registry key will depend on which Stylus Studio version/edition you are running)
Changes to the Tools > Options page will tend to reset that value to the maximum value accepted by the UI (500 decimal).”

 

So, if you stay in Stylus Studio, the above might work.

 

Regards,

Mike Waters

 

 

 

 

From: Cuzner Stephen P [mailto:Stephen.P.Cuzner@irs.gov]
Sent: Monday, February 23, 2009 10:30 AM
To: Mailing list for the SAXON XSLT and XQuery processor
Subject: [saxon] Setting Maximum recursion depth

 

I'm running saxon 8.9.0.3 in Stylus Studio using a custom stylesheet that uses the cals/oasis table module from the docbook stylesheet collection. My instance xml document has a huge table, not too many columns, but thousands of rows. When it gets to about 500 rows the process dies saying the the maximum recursion depth has been exceeded. Is this memory dependent, related to the jvm, or a setting/preference in saxon that I can change?

 

Steve