For the document() function, if you don't provide a URIResolver, the default one will build a DTM.

This problem should be fixed in 2.7. If you can't upgrade to 2.7, you can try to extract the source for 2.6, apply the patch and build your own jar. Morris Kwan fixed a memory leak bug for XMLReaderManager long time ago. You can find the patch at http://issues.apache.org/jira/browse/XALANJ-1844

If it doesn't work, please open a bug report and attach a test case that can demonstrate this problem.

Christine Li
XSLT Development
IBM Toronto Lab
Tel: (905)413-2601
Email: [EMAIL PROTECTED]



"Paul Hunnisett" <[EMAIL PROTECTED]>

10/05/2006 06:16 AM

To
xalan-j-users@xml.apache.org
cc
Subject
Memory leak in document() function in xalan





We are currently working with xalan 2.6.  There are a lot of dependencies so I'm not sure if upgrading to 2.7 would be easy for us.

Anyway, the problem that we're having is that one application uses an XSL transform and relies on a helper xml file which is pulled in via the document() function.  We are finding that this causes massive memory problems.  I can only assume (perhaps I'm wrong on this) that xalan is gettign a dom of that file for every document() call and then not releasing references to that object.  Has anyone else come across anything like this?

Does anyone have any wisdom as to how we might go about working around this?  We also run these stylesheets in MSXML which, I'm told, doesn't supprot XSLT 2 - so any XSLT 2 solutions may not work for us...

Cheers

Paul Hunnisett

Reply via email to