An unforseen consequence of the fix to 441078 is that
temporary trees (result tree fragments) are now
registered in the document pool, which means they will
not be garbage collected until the end of a
transformation. For a transformation that uses many
temporary trees, this can result in excessive memory
Note that the temporary tree is not registered in the
document pool unless it is used as a node-set, i.e.
in ways that XSLT 1.0 does not permit, for example by
using the variable in a path expression such as
$tree/nodes. If it used simply as a string, or in
xsl:copy-of, it is not registered and will therefore
still be garbage-collected when no longer in use.
(Source code note: The problem applies to both
implementations of temporary trees, FragmentValue and