Re: [xslt] scoped result tree fragments
- From: Mark Vakoc <thevakoc-xml yahoo com>
- To: veillard redhat com, The Gnome XSLT library mailing-list <xslt gnome org>
- Cc:
- Subject: Re: [xslt] scoped result tree fragments
- Date: Thu, 8 Jul 2004 08:46:58 -0700 (PDT)
--- Daniel Veillard <veillard redhat com> wrote:
> Well, the ctxt->tmpRVT are supposed to be cleaned up when you exit
> their scope i.e. the template where they are declared,
> See the end of xsltApplyOneTemplate() in transform.c that's where
> the deallocation occurs. If you don't exit templates, there is no way
> for libxslt to know that there is no more reference to them.
>
Ah, I missed that. When I was stepping in with a debugger all I noticed was
ctxt->tmpRVT which looked like it persisted for the duration of the transform
context, I understand how it works now. Changing my stylesheet to use more
templates should minimize the consumption.
Aggressive dictionary use would also help. Currently I used a lot of
xmlNewTextChild() to build the result tree fragment in an extension, which in
my case contains a lot of repetive element names. Is there a way to use the
transform's dictionary to minimize memory usage?
Thanks.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]