[xml] automatic memory recovery in extension functions



I'm trying to do automatic memory recovery with extension
functions. 

I'm restricting myself to Python right now.

When an extension function is called it might sometimes have to create
an xml document which will need to be collected long after the
function has ended.

The obvious way of approaching this (it seemed to me) was to have the
function register objects that needed cleaning up with something that
lives for as long as the transformation and then clean them up when
the transformation has ended.

The trouble is that the extension functions get an xsltContext object
for their context but I can't see how to get the xsltContext of a
transform from the actual transform.

In other words, I can see how an extension function can put things
into a cache per transform but I can't see how to remove the things
from the cache when the transform has ended.


Is their a way to get the xslt context associated with a transform?



Nic Ferrier



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]