Re: [xml] Cancelling xsltApplyStylesheetUser()
- From: Daniel Veillard <veillard redhat com>
- To: Brent Smith <gnome nextreality net>
- Cc: Shaun McCance <shaunm gnome org>, xml gnome org
- Subject: Re: [xml] Cancelling xsltApplyStylesheetUser()
- Date: Sun, 2 Jul 2006 05:20:57 -0400
On Sat, Jul 01, 2006 at 04:30:11PM -0600, Brent Smith wrote:
Hi,
Shaun McCance and myself have been looking at ways to cancel a long
running xsltApplyStylesheet() call. We want it to be possible for the
user to cancel an operation if it is taking too long in Yelp[1] (GNOME's
help browser).
Shaun has found that setting the xsltTransformContext->state =
XML_STATE_STOPPED in the extension element function, the
xsltApplyStylesheet() call then returns immediately (after the ext.
element function returns).
My question is, if we cancel the process in this way, is the
transformContext and result document in a consistent state where we can
just call xsltFreeTransformContext() and xmlFreeDoc() and not leak large
amounts of memory?
yes, that should be fine, the processor when detecting that state will
stop processing further templates, and the processing will gracefully pop
up all template contexts.
If you experience leaks there (assuming you freed up all resources when
done) then that means there is a bug, but this really should not happen.
Daniel
--
Daniel Veillard | Red Hat http://redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]