Streamability of pattern with call to accumulator-before()
causes a template rule to be deemed non-streamable on the grounds that the pattern is not motionless. This appears to be incorrect according to the W3C streamability analysis.
Updated by Michael Kay over 6 years ago
- Status changed from New to Resolved
The code in Expression.toPattern() is creating a GeneralNodePattern, and a GeneralNodePattern is always deemed to be not motionless. The reason a GeneralNodePattern is used is that the predicate passes the test isPositionalFilter(getFilter(), th). This code is returning true if the filter includes a call on a system function that is registered as focus-dependent. This test is too strong; we should only be considering whether there is a dependency on position() or last().
I have refined the data in the StandardFunctions table so that dependencies on the context item, position, and size are captured separately, rather than being bundled into a single dependency on the focus. This has solved the problem for this test case (stream-201), though we need to regression test it carefully.
Please register to edit this issue