From: William M. Brack (wbrack@mmm.com.hk)
Date: Thu Mar 01 2001 - 21:54:03 EST
While trying libxslt we encountered a failure in a particular template,
which was eventually traced to libxml2/xpath.c. The problem can be
demonstrated using the program testXPath and it's 'built-in' xml file. The
expression
//title[(ancestor::*/@prop99) or (ancestor::*/@prop1)]
should produce a nodelist with all the <<title>> elements (since the parent
node <<EXAMPLE>> contains the attribute <<prop1>>), but instead produces an
empty list.
It appears the cause is because the routine xmlXPathNodeCollectAndTest
destroys ctxt->context->node within it's "for" loop. When that variable is
saved before the loop, and restored after the loop has completed, the
expression evaluates correctly.
The problem was isolated (yesterday) in version 2.3.2 (never mind how long
that took me....). The probem is also present in the latest version
(2.3.3).
Bill Brack
ABC QuickSilver
Hong Kong
---- 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 : Fri Mar 02 2001 - 10:43:35 EST