-
-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug in document-node(element(xxx)) #1932
Comments
Here is an xqsuite test demonstrating the failure: xquery version "3.1";
module namespace mi = "http://exist-db.org/test/matching-item";
declare namespace test="http://exist-db.org/xquery/xqsuite";
declare
%test:assertTrue
function mi:document() {
document { element book {} } instance of document-node()
};
declare
%test:assertTrue
function mi:document-element() {
document { element book {} } instance of document-node( element() )
};
declare
%test:assertTrue
function mi:document-element-name() {
document { element book {} } instance of document-node( element(book) )
}; This currently returns the following results: <testsuites>
<testsuite package="http://exist-db.org/test/matching-item"
timestamp="2018-06-09T14:43:20.033-04:00" failures="1" pending="0"
tests="3" time="PT0.009S">
<testcase name="document" class="mi:document"/>
<testcase name="document-element" class="mi:document-element"/>
<testcase name="document-element-name" class="mi:document-element-name">
<failure message="assertTrue failed." type="failure-error-code-1"/>
<output>false</output>
</testcase>
</testsuite>
</testsuites> |
I think as this is in the query processor it is probably one for @wolfgangmm |
This bug is still present in eXist 5.0.0. |
@adamretter Approved by @dizzzz and now merged. Many thanks! And thanks to @djbpitt for reporting the issue! (See the tests that are now in the source code to prevent future regressions: https://github.com/eXist-db/exist/blob/develop/exist-core/src/test/xquery/document-nodes.xq.) |
What is the problem
Describe exactly what you see (e.g. an output of an XQuery)
returns zero results in eXist-db 4.0, although the play exists. It returns one result, as expected, in <oXygen/>.
What did you expect
I expected it to return the play:
(https://www.w3.org/TR/xpath-31/#id-matching-item)
Describe how to reproduce or add a test
Run the example above on an eXist-db installation with the Shakespeare app installed.
Context information
The text was updated successfully, but these errors were encountered: