[xslt] get transform context from extension function ?
- From: Tom Moog <tmoog polhode com>
- To: xslt gnome org
- Subject: [xslt] get transform context from extension function ?
- Date: Thu, 26 Jul 2001 12:12:34 -0500 (CDT)
I am using libxslt 1.0.1
I am writing an extension function which creates an
external object (xmlXPathObjectType = XPATH_USERS).
The actual data is pointed to by the void * user data
in xmlXpathObject. This user field is filled in by a
call to xmlXPathReturnExternal.
It appears that when an external object is deallocated
the xmlXPathObject is simply deallocated and the user
field is ignored. So, I thought I'd keep a list of
all the external objects which have been allocated in
the transform context. Then, when the transform context
is deallocated I could run through this list of external
objects and deallocate them.
I have already made a minor change to xsltApplyStyleSheetInternal
so that I can get access to the transform context for
another part of my application, but I'm trying to keep
down the number of such changes to the distribution.
My problem: when the extension function is called it
receives a pointer to the xmlXPathParserContext, and
I'm not sure how to find the current transform context.
>From xmlXPathParserContext I can get an xmlXPathContext.
>From xmlXPathContext I can get a pointer to a node or
a document. From there, I suppose I could find the
transform context.
Is there a better way ?
Tom Moog
Polhode, Inc.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]