Re: [xslt] scoped result tree fragments
- From: Daniel Veillard <veillard redhat com>
- To: The Gnome XSLT library mailing-list <xslt gnome org>
- Subject: Re: [xslt] scoped result tree fragments
- Date: Thu, 8 Jul 2004 12:31:59 -0400
On Thu, Jul 08, 2004 at 08:46:58AM -0700, Mark Vakoc wrote:
> 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.
yup, you need to add depth. Might be a bug in that processing too...
> 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?
Hum, libxslt doesn't fully use the dictionnaries yet. But you should
be able to use it for xmlNewTextChild(), pass a NULL content, generate
a disctionnary entry with xmlDictLookup() for your text, using the
doc->dict, and the set the content of the text children of teh returned
element to that dictionnary entry. Libxml2 should take care of the
(non-)freeing . Automatic dictionnary usage for text node content is
not possible because at some point a too big dictionnary performs worse
than no dictionnary, it's a trade off ...
Daniel
--
Daniel Veillard | Red Hat Desktop team 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]