List Info

Thread: New function xmlXPathCompiledEvalIsTrue()




New function xmlXPathCompiledEvalIsTrue()
user name
2006-06-26 16:48:35
Hi,

FYI: The function xmlXPathCompiledEvalToBoolean() was
added to the API.

Regards,

Kasimier

> -----Original Message-----
> From: xml-bouncesgnome.org [mailtoml-bo
uncesgnome.org] On 
> Behalf Of Buchcik, Kasimier
> Sent: Tuesday, June 20, 2006 8:30 PM
> To: xmlgnome.org
> Subject: [xml] New function
xmlXPathCompiledEvalIsTrue()
> 
> Hi,
> 
> I'd like to add the following public function to
xpath.h. It will
> evaluate an expression and convert it internally to a
boolean result.
> This will spare the need of exchanging an XPath boolean
object, plus
> the evaluation can be optimized to stop at the first
sign
> of a positive result.
> 
> /**
>  * xmlXPathCompiledEvalIsTrue:
>  * comp:  the compiled XPath expression
>  * ctxt:  the XPath context
>  *
>  * Evaluates the given compiled expression and applies
the XPath
> boolean()
>  * function on the result.
>  *
>  * Returns 1 if the expression evaluated to true, 0 if
to false and
>  *         -1 on API and internal errors.
>  */
> int xmlXPathCompiledEvalIsTrue(xmlXPathCompExprPtr
comp,
>   xmlXPathContextPtr ctxt);
> 
> Any cons?
> 
> Regards,
> 
> Kasimier

_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xmlgnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )