Re: (no subject)

Denis Davidov <[email protected]>
Newsgroups gmane.comp.gnome.lib.xslt
Message-ID <CALUsooVadgmXD+1f-OHZGeMBo+N519i=EB_5iBRELXFnSWiuUQ@mail.gmail.com>
Hey Phil, thanks for help! :) Let me ask a few more questions.

2012/2/28 Phil Shafer <[email protected]>:
> Denis Davidov writes:
>>Looks like I need some help here :) I create xmlXPathContextPtr with
>>xmlXPathNewContext(document). Usually I perform XPath-requests with
>>xmlXPathEvalExpression(expression, context);
>>But nodePush / nodePop works with xmlParserCtxtPtr. I investigated the
>>API and didn't find how I can obtain xmlParserCtxtPtr from my
>>xmlXPathContextPtr. Could you give me a hint? :)
>
> My code says:
>
>    xmlParserCtxtPtr ctxt = xmlNewParserCtxt();

Yep, I see how I can create xmlParserCtxt. The question isn't about
it. The question - how can I force my xsltTransformContext to use this
xmlParserCtxt?

And one more question: you suggested to use
xsltRegisterExtModuleFunction instead of xsltRegisterExtFunction. Yep,
this works fine. But now I need to evaluate some XPath-expression that
contains some of the registered external functions. I don't mean
XPath-expression inside XSL - that part works fine. I mean some
standalone expression that contains in some string variable. For
example:

xsltRegisterExtModule("http://hello.com/", &initialize, &shutdown); //
I registered the module
xsltRegisterExtModuleFunction("hello", "http://hello.com/",
&function_handler); // I registred the function
char const* expression = "hello('world', 15)"; // Now I need to evaluate this

xmlXPathObjectPtr = ...how?... (expression);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.