XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
the man with zestSubject: The XSL processor stack has overflowed - probable cause is infinite template recursion".
Author: the man with zest
Date: 04 Mar 2007 04:09 AM

Hello Guys,
whz up?

Well, while running the following code:

<xsl:call-template name="htmlnewline">
<xsl:with-param name="number" select="floor((string-length(substring-before($result,'| ')) div 2) -1)"/>
</xsl:call-template>

I've got the following error:
"XSL transformation failed due to following error:
The XSL processor stack has overflowed - probable cause is infinite template recursion".

If i print the code in the "Select" using value-of , like the following code:
<xsl:value-of select="concat('to activate: ',floor((string-length(substring-before($result,'| ')) div 2) -1))"></xsl:value-of><br></br>

it was located before entering the call-template tag - it prints the value '1' and don't give me any errors ('1' is the wanted value that i want to give it).

The original code worked fined and was:
<xsl:call-template name="htmlnewline">
<xsl:with-param name="number" select="floor(string-length(substring-before($result,'| ')) div 2)"/>
</xsl:call-template>

If you can pls help me with this issue so i'll be able to proceed..
Thanks in advance,
Zest

Postnext
Minollo I.Subject: The XSL processor stack has overflowed - probable cause is infinite template recursion
Author: Minollo I.
Date: 04 Mar 2007 08:32 AM
Does htmlnewline call itself recursively? If you have a stack problem, the issue is not about how you call the template, but how deeply nested calls to the template are; which is usually a symptom of infinite recursion...

Postnext
the man with zestSubject: The XSL processor stack has overflowed - probable cause is infinite template recursion
Author: the man with zest
Date: 04 Mar 2007 09:55 AM

Yep. :-)
here's the code for this template:
<xsl:template name="htmlnewline">
<xsl:param name="number"/>
<xsl:if test="$number != 0"><br/>
<xsl:call-template name="htmlnewline">
<xsl:with-param name="number" select="$number - 1"/>
</xsl:call-template>
</xsl:if>
</xsl:template>

Posttop
Minollo I.Subject: The XSL processor stack has overflowed - probable cause is infinite template recursion
Author: Minollo I.
Date: 04 Mar 2007 10:22 AM
Use Stylus Studio to set a breakpoint on the if condition in the template, and check the value of $number in the Variables window; that will help you understand what's going on.

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.