Too many nested template or function calls

Oxygen general issues.
ronix
Posts: 12
Joined: Wed Oct 31, 2007 1:25 pm

Too many nested template or function calls

Post 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… :D 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!
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Too many nested template or function calls

Post 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
ronix
Posts: 12
Joined: Wed Oct 31, 2007 1:25 pm

Re: Too many nested template or function calls

Post 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
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Too many nested template or function calls

Post 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
ronix
Posts: 12
Joined: Wed Oct 31, 2007 1:25 pm

Re: Too many nested template or function calls

Post by ronix »

ok, this had some effect: after the increasing the max. stack-depth from 600 to 1000 the debug execution sucseed. :D
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
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Too many nested template or function calls

Post 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
Post Reply