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 29698 - [XSLT30] Streamable merging does not require streamability checking anymore
Summary: [XSLT30] Streamable merging does not require streamability checking anymore
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 minor
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-18 12:53 UTC by Abel Braaksma
Modified: 2016-10-06 18:42 UTC (History)
0 users

See Also:


Attachments

Description Abel Braaksma 2016-06-18 12:53:43 UTC
The text in 19.10 currently says:

<quote>
Specifying streamable="yes" on xsl:merge declares that the merging process is streamable.
</quote>

But in fact, it is an attribute of xsl:merge-source. Also, this attribute is implicitly "yes" if absent and you specify xsl:merge-course/@for-each-stream.

Furthermore, we have changed the way streaming is done with merging, using an implicit snapshot function. As a consequence of these new rules, there is no limit on what you can do inside the xsl:merge child declarations and expressions.

I'm not necessarily convinced we should remove it from section 19.10, but whenever you specify this, and whatever syntactically legal constructs are used, it is always "guaranteed-streamable". So perhaps a different wording should be used here?
Comment 1 Abel Braaksma 2016-06-18 13:03:13 UTC
Oops, not entirely correct. The xsl:merge-source/@select expression is bound to certain rules to be guaranteed streamable:

<quote>
3. The expression in the select attribute of that xsl:merge-source element, assessed with a context posture of striding and a context item type of U{document-node()}, has striding or grounded posture and motionless or consuming sweep.
</quote>

And there are a few other rules in there as well. The snapshot-effect applies to xsl:merge-action, not the select-expression. 

So, perhaps we should change the 19.10 mention something as follows:

<quote>
Specifying streamable="yes" either explicitly or implicitly (through the for-each-stream attribute) on xsl:merge-source declares that the selection of merge items on that source is streamable.

Note:
This does not impose rules on the child instructions of xsl:merge, in particular, xsl:merge-action can contain free-ranging or roaming constructs. This is a result of an implicit call to the fn:snapshot function as described in section 15.4 Streamable Merging.
</quote>
Comment 2 Michael Kay 2016-07-06 22:52:44 UTC
Having carefully re-read the relevant sections, I think the only change needed is that in 19.10, the sentence

Specifying streamable="yes" on xsl:merge declares that the merging process is streamable.

should change to

Specifying streamable="yes" (implicitly or explicitly) on xsl:merge-source declares that the merging process is streamable with respect to that particular input.
Comment 3 Abel Braaksma 2016-07-07 00:28:45 UTC
That is pretty close to my proposal in comment #1, except for adding the suggested Note. I can live with it either way, though considering xsl:merge is treated specially w.r.t. streaming in regards to other constructs, I think there's an argument for adding a Note similar to my suggestion in comment #1.
Comment 4 Michael Kay 2016-07-10 17:02:23 UTC
The WG approved the change in comment #2, and the change has been applied. I also took the opportunity to correct the very similar sentence in 15.4 which incorrectly referred to the streamable attribute of xsl:merge.