Closed Twilight-Shuxin closed 1 year ago
The current behavior is correct; it seems to be wrong in Saxon and eXist:
//*
returns <K id="1">1</K>
@n1
returns an empty sequence() >= -1
returns false()
exists(false())
returns true()
, as false()
is a single item of type xs:boolean
Feel free to close the issue if you agree.
Thanks a lot for the explanation! It seems that this is correct while a bit tricky and I will close the issue :)
I tried this under Saxon 12.x and it gives the same (correct) result as BaseX.
@michaelhkay , but 11.5 (tried with both HE 11.5 Java as well as SaxonCS 11.5) doesn't select anything.
@martin-honnen Thanks for the feedback.
@michaelhkay I initially tested this on Saxon-HE 12.0, which is currently out of date. Today I tried again with the latest Saxon-HE12.2 release and it seems that the problem still exists.
I used the Saxon-HE 12.2 jar files in SaxonHE12-2J.zip as external libraries and ran from java on Windows.
Thanks. I feel we're trespassing on this space to be discussing this here: could we please continue the conversation at https://saxonica.plan.io/issues/6051 - thank you.
@michaelhkay Sure, thanks!
Description of the Problem
Given this XML document:
and XPath Query
BaseX give result
Expected Behavior
Should return empty result set as eXist & Saxon since attribute n1 does not exist in node K.
Steps to Reproduce the Behavior
create database test
put test.xml path/to/file
xquery //*[exists(@n1 >= -1)]
Do you have an idea how to solve the issue?
No response
What is your configuration?
BaseX version: BaseX 10.7 beta latest commit 081fb4d on Windows