This is a possible bug which was found at the XML Summer School in the XQuery class taught by @adamretter
An XQuery that attempts to match a path and return either the result of a function or the empty sequence, using an idiom for "if present then something else empty sequence", appears to be returning incorrect results in eXist-db 4.3.1.
What is the problem
This is a possible bug which was found at the XML Summer School in the XQuery class taught by @adamretter
An XQuery that attempts to match a path and return either the result of a function or the empty sequence, using an idiom for "if present then something else empty sequence", appears to be returning incorrect results in eXist-db 4.3.1.
What did you expect
Using this query:
The expected result, as produced by BaseX 9.0.2, is:
The result produced by eXist-db 4.3.1 is:
Describe how to reproduce or add a test
As above.
Context information
eXist Version: | 4.3.1 eXist Build: | 201807241821 Operating System: | Windows 7 6.1 amd64 Java Version: | 1.8.0_172 Installed using JAR installer. No customization of conf.xml