exist icon indicating copy to clipboard operation
exist copied to clipboard

No static typing

Open line-o opened this issue 8 months ago • 5 comments

Description:

fixes #2445

Reference:

  • exist-db never stated that it would implement / support the static typing feature
  • with XQuery 4.0 static typing feature is removed entirely
  • [ ] drop static typing feature from XQST runner (see https://github.com/eXist-db/exist-xqts-runner/blob/21abfbb8cca2ad6eb300a0af030f3a23f16ab625/src/main/scala/org/exist/xqts/runner/XQTSRunner.scala#L92)
  • [ ] open issue to prominently state that exist-db does not support the static typing feature

Type of tests:

XQSuite tests

line-o avatar Mar 16 '25 19:03 line-o

I applied commits from an older PR that targeted develop-6.x.x and it took 3 attempts to get it to compile. I will look to add one or two tests from the original issue.

line-o avatar Mar 16 '25 21:03 line-o

I would expect for one to many additional XQTS test cases to now pass.

line-o avatar Mar 16 '25 21:03 line-o

There seems to be zero tests that assert error XPST0005 to be raised. ;)

line-o avatar Mar 16 '25 22:03 line-o

I am wondering.... should this code change be 'protected' to it would not be effective for 'query 3.1' (and older) based queries?

dizzzz avatar Mar 17 '25 07:03 dizzzz

The error with code XPST0005 should only be raised when a XQuery processor implements the static typing feature.

exist-db never claimed to support this optional feature, which is why I believe we do not need to guard against it. I do agree that one can argue it is a breaking change which is why I ported my original PR #3653 to target exist 7 instead.

With this PR applied XPath queries will behave much more like in any other Xquery processor (namely baseX and Saxon).

line-o avatar Mar 17 '25 14:03 line-o

An interesting idea of how to fix the issue... But it must be recognised that this small change is very significant!

Before it is merged two things need to be checked carefully in great detail:

  1. No regression in the XQTS results
  2. No performance regression (looking at the code change, I suspect this PR will result in a regression in its current form)

adamretter avatar Aug 04 '25 10:08 adamretter