Sandra,
thanks for your profound feedback, which is always valuable. Your bugs should now be fixed; please try: http://www.basex.org/maven/org/basex/basex/6.1.4
The following xquery returns 464 <persName> elements with saxonHE but fails to produce any <persName> elements when the query is run in basex (6.1.3).
I could break down the problem to the following query…
for $a in 1 let $b := () return $a
…in which the FLWOR clause was optimized away. We didn't notice this bug before as the optimization worked well on queries like the following:
let $a := 1 let $b := () return $a
for $a in 1 for $b in () return $a
I had a devil of a time detecting this. I also have encountered bad behaviour when running queries against attributes which exist but have no value, like this:
<el attr="">
Yep… The index now remembers empty strings as well. Please rebuild your indexes to get this one working.
All the best, Christian