From: David Moore (dmoore@its.caltech.edu)
Date: Sun Nov 12 2000 - 21:17:02 EST
The other day I sent a message regarding a bug in libxml's 2.2.7 xpath
support in regards to evaluating relative paths.
I think I've found the source of the bug. In 2.2.6, the following code
appeared in xmlXPathEval() just before xmlXPathEvalExpr() gets called:
if (ctx->node != NULL) {
init = xmlXPathNewNodeSet(ctx->node);
valuePush(ctxt, init);
}
In the case of relative paths, the user specifies a value for ctx->node
and thus it is not null. Without doing the above (as it is in 2.2.7 and
the current CVS), the CHECK_TYPE(XPATH_NODESET) assertion in
xmlXPathNodeCollectAndTest() will fail later on. I'm not sure if the
correct solution is simply to put back the above code, or replace the
functionality elsewhere, but I'm including a patch to just put back the
above code.
I hope this is helpful (relative path evaluation is very important to my
application).
Thanks.
Regards,
David
------------------------------------------------------
David Moore California Institute of Technology
<dcm@acm.org> http://www.ugcs.caltech.edu/~dmoore
------------------------------------------------------
---- Message from the list xml@rpmfind.net Archived at : http://xmlsoft.org/messages/ to unsubscribe: echo "unsubscribe xml" | mail majordomo@rpmfind.net
This archive was generated by hypermail 2b29 : Mon Nov 13 2000 - 03:43:57 EST