Hello,

I am willing to do some performance measurements with the XPath compiler
of Xalan C++. Both in the "SimpleXPathCAPI.c" sample found in the
distribution and in the documentation, only a very particular method
"XalanEvaluateXPathAsBoolean()" is mentioned in order to evaluate a
compiled XPath expression.

I have two questions:

1) Is this the only one?
2) The name of the function includes "AsBoolean()", which makes me ask
wether it is a classic XPath evaluation that returns the resulting node
set (see the XPath specification [1] or Wadler's semantics [2]) ? or is
it a simplification that does not compute the full node set but only
returns some boolean and/or terminates just after the first matching
node is found?

In the "SimpleXPathCAPI.c" sample of the distribution, I can see:
  ...
  theResult = XalanEvaluateXPathAsBoolean(theXalanHandle,
theXPathHandle, theBuffer, theBoolean);
  ...
and then, a few lines below, I see:
  ...
  if (theResult == XALAN_XPATH_API_SUCCESS)
      {
       fprintf(stdout, "The result of the expression was '%s'.\n",
theBoolean == 0 ? "false" : "true");
      }
  ...

So I am unsure about what this function effectively computes, and found
no hint in the documentation.

[1] J. Clark, S. DeRose, XML Path Language (XPath), Version 1.0, W3C
Recommendation 16 November 1999, http://www.w3.org/TR/xpath [2]  P.
Wadler, Two semantics for XPath, January 2000,

http://homepages.inf.ed.ac.uk/wadler/papers/xpath-semantics/xpath-semant
ics.pdf


Thanks,

Pierre

__
Pierre Geneves, Ph.D. student, http://wam.inrialpes.fr

Reply via email to