Dear Toon Calders,
thanks for your detailed bug report. Yes, this was a serious issue; the predicate was optimized for an accessing the index, although it was dependent on the query context. This is now fixed in the repository version 6.1.1 of BaseX:
http://basex.org/maven/org/basex/basex/6.1.1/
I've forwarded your mail to the mailing list to let others know about it as well.
All the best, Christian
On Thu, Apr 29, 2010 at 12:17 PM, Calders, T.G.K. t.calders@tue.nl wrote:
Dear BaseX developers,
First of all, many thanks for making this nice tool freely available. I use it in my Database class so the students can practice a bit with XPath and XQuery and they are all, without any exception, very enthusiastic about the tool.
During class today, however, one of the students encountered a strange query output; I reduced the example to its essence:
For the following document:
<errordoc> <instructor fname="Toon" sname="Calders"/> <lecturer fname="Toon" sname="Calders"/> </errordoc>
We ran the query “//instructor[@sname=../lecturer/@sname]” which returned an empty answer when executed with BaseX 6.1. (with previous versions it seems to work fine; e.g., 5.7).
On the other hand, the query:
let $x:=<errordoc> <instructor fname="Toon" sname="Calders"/> <lecturer fname="Toon" sname="Calders"/>
</errordoc>
return $x//instructor[@sname=../lecturer/@sname]
does return:
<instructor fname="Toon" sname="Calders"/>
Best regards, Toon Calders TU Eindhoven
___________________________
Christian Gruen Universitaet Konstanz Department of Computer & Information Science D-78457 Konstanz, Germany Tel: +49 (0)7531/88-4449, Fax: +49 (0)7531/88-3577 http://www.inf.uni-konstanz.de/~gruen
basex-talk@mailman.uni-konstanz.de