Re: [xslt] (no subject)



Hey Phil, thanks for help! :) Let me ask a few more questions.

2012/2/28 Phil Shafer <phil juniper net>:
> 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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]