wrong result for paths with nested predicate

Bug #866414 reported by Matthias Brantner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Won't Fix
Critical
Matthias Brantner

Bug Description

The following query returns an empty result if the context-item is set to the attached document. However, the result shouldn't be empty.

declare default element namespace "http://www.w3.org/1999/xhtml";
fn:data (//td [not(@class) and parent::tr[@class]]/a/text())

The result is correct, if the nested @class predicate is removed from the path expression.

Tags: core-runtime
Revision history for this message
Matthias Brantner (matthias-brantner) wrote :

The file doc.xml was added: document used as context-item in the query above

Revision history for this message
Markos Zaharioudakis (markos-za) wrote :

Matthias, the query works for me. Can you please double check again?

Revision history for this message
Matthias Brantner (matthias-brantner) wrote :

Markos, I double checked again. In Revision 6506 I still get the empty result. I also double checked with Saxon which gives me my expected result of 260 text nodes. I executed the query as follows (note that doc.xml contains the file that is attached to this bug report):

tmp.xq
declare default element namespace "http://www.w3.org/1999/xhtml";
fn:data (doc("doc.xml")//td [not(@class) and parent::tr[@class]]/a/text())

command
bin/zorba -q tmp.xq -f

Revision history for this message
Matthias Brantner (matthias-brantner) wrote :

Thanks Markos. I verified again (on Linux) and it's indeed a problem only existing on Macs. The problem is because of a bug in libxml 2.2 shipped with Mac OS X. I installed a newer version and it works.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.