Closed Twilight-Shuxin closed 1 year ago
Good catch. The comparisons were rewritten to true()
, no matter if @t1
returned a result. It’s now rewritten as follows:
//T1[@t1 <= 0 or @t1 >= -10]
→ //T1[exists(@t1)]
→ //T1[@t1]
Please note that <x/>[. <= 0 or . >= 0]
will not raise an error, even though the input cannot be converted to a double value. Both results are correct: The language specification allows code to be simplified if valid input would always yield the same result.
Another example is <x/>[exists(xs:double(.))]
, which gives different results depending on the query processor you use.
Thanks a lot!
Description of the Problem
Given this XML document:
and XPath Query
BaseX give result
Expected Behavior
Should return empty result set as Saxon & Exist db.
Steps to Reproduce the Behavior
create database test
put test.xml path/to/file
xquery //T1[(@t1 <= 0) or (@t1 >= -10)]
Do you have an idea how to solve the issue?
No response
What is your configuration?
BaseX version: 10.5 latest stable snapshot on Windows