Bug #2389
closedStreaming failure: No transmission filter available for let $zz:zz472117691 := ...
100%
Description
A test stylesheet using xsl:stream fails with the above error.
Updated by Michael Kay over 9 years ago
The basic problem is a failure to handle a path expression (or for-each expression) whose LHS is a let expression:
(let $x := data($y) return a / b[$x = @y]) / c
This expression is constructed as the result of a previous optimisation.
The simplest (though ad-hoc) aproach might be to move the variable binding out of the path expression, making it
let $x := data($y) return ( a / b[$x = @y] / c )
Updated by Michael Kay over 9 years ago
I changed LetExpressionAdjunct to be a TransmissionFilter and it fixed this case. Unfortunately it broke other tests, notably tests where the "select" rather than the "action" part of the LetExpression is consuming. I don't immediately see a way around this apart from having two different versions of LetExpressionAdjunct for the two cases, which is unconventional, but might be doable.
Updated by Michael Kay over 9 years ago
I've changed it to use a different StreamingAdjunct depending on which subexpression is consuming, and this both fixes the bug and solves the regression problems. I'm not very happy with this design (partly because we need a StreamingAdjunct in order to decide which subexpession is consuming...) but it will do for a patch. For 9.7 we need to look at the approach more carefully.
I've committed the 9.6 patch, but leaving open for further thought on 9.7
Updated by Michael Kay over 9 years ago
Simplified version of the repro added to the w3c test suite as insn/stream-500
Updated by Michael Kay over 9 years ago
- Status changed from In Progress to Resolved
For 9.7 I decided to do essentially what the 9.6 patch does: have two different streaming Adjuncts for a LetExpression depending on which operand is consuming. But I regularised the approach slightly by introducing Expression.getStreamingAdjunct(Operand consumingOperand) so that any expression can play this trick.
Updated by O'Neil Delpratt over 9 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in version set to 9.6.0.7
Bug fix applied in the Saxon 9.6.0.7 maintenance release.
Updated by O'Neil Delpratt almost 9 years ago
- Applies to branch 9.6 added
- Fix Committed on Branch 9.6 added
- Fixed in Maintenance Release 9.6.0.7 added
Please register to edit this issue