List Info

Thread: New function xmlXPathCompiledEvalIsTrue()




New function xmlXPathCompiledEvalIsTrue()
user name
2006-06-20 18:29:44
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 )