We are generating a PDF document with a number of XML files. The XSL consists of the logic to compare the xml files with each other to highlight certain changes that happened in the past in the xmls. However while the PDF generation it gives Out of memory error- Java Heap Space. While profiling we saw a number of objects were being created with the SAXON API that were not being released from memory.


Will switching to SAXON 9.2 help in such scenario.


Please provide some inputs for the same.