Project

Profile

Help

Feature #2645

closed

Support for xsl:fork/xsl:for-each-group[@group-by]

Added by Michael Kay over 8 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XSLT conformance
Sprint/Milestone:
-
Start date:
2016-02-24
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
9.7
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

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.

Actions #1

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

Actions #2

Updated by Michael Kay over 8 years ago

  • Applies to branch 9.7 added
Actions #3

Updated by Michael Kay over 7 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.

Actions #4

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

Also available in: Atom PDF