Too many nested apply-templates calls
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 10
- Joined: Tue Aug 24, 2010 6:49 pm
Too many nested apply-templates calls
Hi,
I'm getting the error message "Too many nested apply-templates calls" when I try to transform my DocBook file to HTML using your unmodified DocBook HTML transformation scenario. I followed the directions here:
https://www.oxygenxml.com/doc/versions/ ... chers.html
to increase the amount of memory with -Xmx. I tried values up to -Xms14000m, I have 16 GB of physical RAM in my machine, but cannot transform successfully.
I'm using Oxygen 18.0, on a Mac with OS X 10.11.6. I run Oxygen by clicking on the icon in the Finder. My file is not really that large, just 547 kB, and about 5300 lines of DocBook XML. There are no images in the file. But, there are several large tables, hundreds to thousands of rows. Unfortunately, I can't share the document outside my company.
Do you have any ideas?
Best Regards,
Marc
I'm getting the error message "Too many nested apply-templates calls" when I try to transform my DocBook file to HTML using your unmodified DocBook HTML transformation scenario. I followed the directions here:
https://www.oxygenxml.com/doc/versions/ ... chers.html
to increase the amount of memory with -Xmx. I tried values up to -Xms14000m, I have 16 GB of physical RAM in my machine, but cannot transform successfully.
I'm using Oxygen 18.0, on a Mac with OS X 10.11.6. I run Oxygen by clicking on the icon in the Finder. My file is not really that large, just 547 kB, and about 5300 lines of DocBook XML. There are no images in the file. But, there are several large tables, hundreds to thousands of rows. Unfortunately, I can't share the document outside my company.
Do you have any ideas?
Best Regards,
Marc
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Too many nested apply-templates calls
Hi,
First, giving a Java application (like Oxygen) 14GB of memory out of a total of 16GB system memory, is a bad idea. We recommend using at most half of the system memory, or 3/4 in extreme situations (need to transform huge files). In your case, 8GB recommended vs 12GB in the extreme scenarios.
Second, "Too many nested apply-templates calls" cannot be resolved by increasing the memory, because it's not a memory problem, it's either a masked stack overflow error, or an imposed limitation of the XSLT transformer. I would suggest reverting the memory configuration settings you made (-Xms and -Xmx) and letting Oxygen use the defaults.
In this case it's most likely a masked stack overflow error that should be worked around by increasing the stack size (-Xss) to 4MB. Try setting a new VM option with the value -Xss4m. You can try to slowly increase this to larger values (e.g. -Xss5m or -Xss6m). Note that this consumes memory on a per thread basis (Oxygen can have tens of threads), so using a very large value here can backfire and leave the application without memory.
Regards,
Adrian
First, giving a Java application (like Oxygen) 14GB of memory out of a total of 16GB system memory, is a bad idea. We recommend using at most half of the system memory, or 3/4 in extreme situations (need to transform huge files). In your case, 8GB recommended vs 12GB in the extreme scenarios.
Second, "Too many nested apply-templates calls" cannot be resolved by increasing the memory, because it's not a memory problem, it's either a masked stack overflow error, or an imposed limitation of the XSLT transformer. I would suggest reverting the memory configuration settings you made (-Xms and -Xmx) and letting Oxygen use the defaults.
In this case it's most likely a masked stack overflow error that should be worked around by increasing the stack size (-Xss) to 4MB. Try setting a new VM option with the value -Xss4m. You can try to slowly increase this to larger values (e.g. -Xss5m or -Xss6m). Note that this consumes memory on a per thread basis (Oxygen can have tens of threads), so using a very large value here can backfire and leave the application without memory.
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service