Page 1 of 1
Too many nested template or function calls
Posted: Tue Apr 29, 2008 7:13 pm
by ronix
Hi,
is it possible to avoid the check for looping templates?
The abort message is: “[Saxon8B] Too many nested template or function calls. The stylesheet may be looping.â€
Indeed this is an generic code for table handling and there are a lot of nested calls…

But I am sure, there is no looping at this place, because I can convert to the end from the command line resp. outside from oxygen.
I tried to increase the memory settings for Eclipse, but there was no effect. Have someone an idea, how to avoid the converting-abort?
I'm using eclipse 3.3.0 with 9.0.0 oxygen.
Thanks!
Re: Too many nested template or function calls
Posted: Wed Apr 30, 2008 10:24 am
by sorin_ristache
Hello,
There is an infinite loop detection that
can be disabled in the XSLT Debugger perspective but in the Editor perspective Saxon 9 does this detection internally and it cannot be disabled. Did you run the same transformation from command line with the same Saxon version and you did not get the error? Can you
send us some sample files (input XML file, the XSLT stylesheet) for reproducing the problem and trying to find a solution?
Regards,
Sorin
Re: Too many nested template or function calls
Posted: Wed May 21, 2008 11:46 am
by ronix
Hi Sorin,
sorry buth the code is not my property so i cant send it to you
The xslt processor was the same.
The difference is most likely in the call of the xslt processor. In our call (java-application started from the command-line) there are
no call-parameter specified.
Even in the Debugger perspective with deactvated loop detection i get the same error message and the debug execution was premature abort.
On the stack they were (every time) 300 template/function calls.
Regards
Re: Too many nested template or function calls
Posted: Wed May 21, 2008 11:53 am
by sorin_ristache
Hello,
Try to increase the maximum limit of calls allowed on the stack with the debugger option Maximum depth in templates stack (menu Options -> Preferences -> XML -> XSLT/FO/XQuery -> Debugger) and run the transformation again in the XSLT Debugger perspective. What is the approx. maximum number of calls that your stylesheet needs to place on the stack?
Regards,
Sorin
Re: Too many nested template or function calls
Posted: Wed May 21, 2008 4:41 pm
by ronix
ok, this had some effect: after the increasing the max. stack-depth from 600 to 1000 the debug execution sucseed.
There is no max. depth fixed in the xsl-code. It depends to the calls-tables in the xml-input.
Thanks for the help! It will be nice, if there is a solution for the editor perspective too, buth i think this is a reasonable way for me.
Regards
Ronix
Re: Too many nested template or function calls
Posted: Thu May 22, 2008 11:01 am
by sorin_ristache
Hello,
In the Editor perspective the limit depends on the XSLT processor. Saxon 9 does not allow you to change the predefined limit.
Regards,
Sorin