-
-
Notifications
You must be signed in to change notification settings - Fork 190
No static typing #5673
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
base: develop
Are you sure you want to change the base?
No static typing #5673
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build is failing;
can we add tests eg from the original bug report?
06f4eea
to
a12a11e
Compare
I applied commits from an older PR that targeted |
I would expect for one to many additional XQTS test cases to now pass. |
There seems to be zero tests that assert error |
I am wondering.... should this code change be 'protected' to it would not be effective for 'query 3.1' (and older) based queries? |
The error with code exist-db never claimed to support this optional feature, which is why I believe we do not need to guard against it. With this PR applied XPath queries will behave much more like in any other Xquery processor (namely baseX and Saxon). |
Turns out, a property for the static return type is already defined by the Step super class. ContextItemExpression uses this now and its own returnType property is removed.
Fixes eXist-db#2445 By definition the following Xpaths must evaluate to an empty sequence - `<a/>[self::b]` - `<a/>/@b/c` - `<a/>/text()/b` Instead of throwing an Exception the staticReturnType of the current step and the contextInfo returnType are set to Type.EMPTY.
a12a11e
to
48082b2
Compare
9e66d95
to
773a278
Compare
refs eXist-db#2445 These tests aim to ensure that certain XPath expressions no longer raise error XPST0005 as exist-db does not implement the static typing feature and this feature is even dropped entirely with the next version of XQuery.
773a278
to
51e4984
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as discussed in telco
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as discussed needs documentation
Description:
fixes #2445
Reference:
Type of tests:
XQSuite tests