Feature #2645
closedSupport for xsl:fork/xsl:for-each-group[@group-by]
0%
Description
XSLT 3.0 allows an xsl:for-each-group instruction with a group-by attribute to appear as a child of xsl:fork, and regards it as streamable even though some buffering of output may be required. This is not implemented in Saxon 9.7 (it is a documented restriction).
We are proposing to introduce this feature (and possibly other missing XSLT 3.0 features) in a maintenance release rather than waiting till the next major release.
Updated by Michael Kay over 8 years ago
A first cut implementation of this feature has been committed. It currently has a number of restrictions:
-
population must be striding, not crawling (no overlapping nodes in the population)
-
single atomic grouping keys only - no composite keys, no items in more than one group
-
if the population is grounded, the entire population is assembled in memory (so there is effectively no streaming)
-
The body of the for-each-group instruction must be consuming
Updated by Michael Kay almost 8 years ago
I have been reviewing where we are on this. Looking at the four restrictions documented above:
-
The XSLT 3.0 specification does not allow the population to be crawling.
-
There is at least one test case handling composite grouping keys, though I cannot find one that allows items to go in more than one group.
-
Handling a grounded population in memory is allowed by the spec, improving this can be deferred as a future enhancement.
-
There is at least one test case where the body of the for-each-group instruction is non-consuming.
So the main outstanding feature is to test that we can handle items going into more than one group.
Updated by Michael Kay over 7 years ago
- Status changed from In Progress to Closed
There is now a test case for items going into more than one group, so I deem this feature to be complete (on the development branch; we won't be adding new features on the 9.7 branch.)
Please register to edit this issue