Re: [xml] How to know XPath expression return type?



On Mon, Sep 12, 2011 at 08:22:20PM +0400, Vladimir B. Grebenschikov wrote:
Hi 

I want to know return type of XPath expression before evaluation, after expression compilation.

Is it possible? (should be theoretically)
How ?

Thanks for advice.

 Perfectly right, we should be able to infer this at compilation time,
but I'm afraid we don't. Could be rather simple to add, basically
adding a type to struct _xmlXPathStepOp, fill it in the leaves
and update the result in xmlXPathComp* functions based on the operation
and operands, then add an API to extract to top level value from an
xmlXPathCompExprPtr(). But that doesn't exist ... yet

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/



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