This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 29696 - [XSLT30] Dropping streamability of the global context item (GCI), in particular, xsl:global-context-item/@streamable
Summary: [XSLT30] Dropping streamability of the global context item (GCI), in particul...
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Candidate Recommendation
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-16 14:39 UTC by Abel Braaksma
Modified: 2016-07-21 16:39 UTC (History)
0 users

See Also:


Attachments

Description Abel Braaksma 2016-06-16 14:39:43 UTC
As a result of discussion in Bug 29670, and the follow-up discussion in https://lists.w3.org/Archives/Public/public-xsl-wg/2016Jun/0000.html and https://lists.w3.org/Archives/Public/public-xsl-wg/2016Jun/0001.html in the public archive and a decision in the XSL WG meeting of 9 June 2016, I was tasked with an action to create a bug report on dropping streamability on xsl:global-context-item.

Reasoning:
The current rules do not allow you to move away from the beginning of the first element of a GCI (any construct accessing the GCI must be motionless). As a result, the GCI cannot be accessed past its head.

Fixing this (i.e., allowing reading the whole stream) proved very hard to write down in spec rules.

Workaround:
The only use-case is getting information on the IMS (initial match selection) in cases where IMS and GCI are the same. This can be circumvented by writing a motionless accumulator that acts on the root node.

Decision:
The decision in the aforementioned XSL WG meeting was to drop this feature as it seems to serve no practical purpose and the rules are complex. The parts of the spec that needs updating are written out here: https://lists.w3.org/Archives/Public/public-xsl-wg/2016Jun/0001.html.
Comment 1 Abel Braaksma 2016-06-16 14:56:55 UTC
For reference, a copy of the findings of "what needs to change" (from MK):

What needs to change?

Firsly, xsl:global-context-item/@streamable is dropped, and with it error XTDE3205, and list item 7 of 19.10 (Streamability guarantees).

In 2.3.2 (Priming a stylesheet) we should add a paragraph: The value given to a stylesheet parameter, or to the global context item, must not include a node in a streamed document. (Note: this ensure that the stylesheet can use the values of parameters and the global context item freely without being constrained by the streamability rules.)

And point out, perhaps in the second note of 2.3.2, that if the initial match selection is a streamed document, then the global context item must be something else (or be absent).

The new Note in 9.5 also needs to go (or to be rewritten).

What about xsl:global-context-item/@use-accumulators? The answer is that since the global context item is now unstreamed, rule 1 of 18.2.2 no longer applies (instead, rule 3 applies, and all accumulators are applicable). Therefore the xsl:global-context-item/@use-accumulators achieves nothing, so the attribute can be dropped.
Comment 2 Michael Kay 2016-06-24 15:30:07 UTC
The changes were agreed and have been applied to the spec.
Comment 3 Abel Braaksma 2016-07-21 16:39:47 UTC
Bug is now closed