In Saxon 7.1, when multiple transformations are run
using the same compiled stylesheet and different source
documents, an OutOfMemory error may eventually
occur. The problem happens when the stylesheet uses
keys.
I changed the strategy in 7.1 so that the indexes used
to support keys are owned by the stylesheet rather than
the source document; this has two benefits. Firstly, the
indexing code is independant of the tree model
implementation, and secondly, if multiple
transformations are done using the same stylesheet and
the same source document, the indexes are not rebuilt
each time.
The implementation relies on using a WeakHashMap to
allow documents to be garbage collected. This code
wasn't working properly.
The problem does not apply to Saxon 6.5.x or earlier
releases.
Source code fixed for 7.2 release.
Reported by Nikita Zinoviev [nikita@tepkom.ru], test
case is filed in MyJava\users\zinoviev
Michael Kay
Logged In: YES
user_id=251681
Fixed in 7.2