Re: [xml] Error in XPath processing
- From: Daniel Veillard <veillard redhat com>
- To: "William M. Brack" <wbrack mmm com hk>
- Cc: xml gnome org
- Subject: Re: [xml] Error in XPath processing
- Date: Fri, 30 Mar 2001 02:49:19 -0500
Hi William,
On Thu, Mar 29, 2001 at 08:02:56PM -0800, William M. Brack wrote:
About a week ago we posted a problem to the xslt mailing list (from
which we have, so far, gotten no response), but we have now confirmed that
Hum, I did reply yesterday
http://mail.gnome.org/archives/xslt/2001-March/msg00031.html
http://mail.gnome.org/archives/xslt/2001-March/msg00033.html
Are you making reference to another post ?
the problem is actually within the XPath processing in the XML library.
okay
Using the "built-in" testfile in the testXPath program, the problem can be easily demonstrated. Given the
XPath expression
"chapter[*]/title[1]"
we are expecting as output the title nodes from the 4 chapters. However, the result produced is only the
first title node, i.e.
[root infobase1 libxml2-2.3.5]# ./testXPath "chapter[*]/title[1]"
Object is a Node Set :
Set contains 1 nodes:
1 ELEMENT title
Any help to solve this problem will be greatly appreciated.
the following request returns the right result:
orchis:~/XML -> ./testXPath "chapter[*]/title"
Object is a Node Set :
Set contains 5 nodes:
1 ELEMENT title
2 ELEMENT title
3 ELEMENT title
4 ELEMENT title
5 ELEMENT title
So I assume it's a problem related to the Step evaluation, and more
precisely the way predicates are handled in xmlXPathCompOpEval or the
way the compiled pattern is generated. It generates the equivalent of
((chapter)[*]/title)[1]
instead of the expected form. This need to be fixed and may requires
a couple of non trivial changes. I will try to fix this before the next
libxml release but unfortunately I'm not in a position to give you
(or anybody else in general) a guaranteed deadline for fixing bugs
even if I try to do it in a timely fashion.
Daniel
--
Daniel Veillard | Red Hat Network http://redhat.com/products/network/
veillard redhat com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]