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 29551 - [FO31] possible ambiguity in Note on fn:uri-collection and relation to streaming
Summary: [FO31] possible ambiguity in Note on fn:uri-collection and relation to streaming
Status: CLOSED WONTFIX
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Functions and Operators 3.1 (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-04-02 15:41 UTC by Abel Braaksma
Modified: 2016-04-05 15:23 UTC (History)
1 user (show)

See Also:


Attachments

Description Abel Braaksma 2016-04-02 15:41:24 UTC
The second bullet in section 14.6.4. fn:uri-collection reads:

<quote>
In XSLT 3.0 it allows the documents in a collection to be processed in streaming mode using the xsl:stream instruction.
</quote>

In XSLT 3.0, the fn:collection function is grounded, which means it cannot be used in streaming (or better, it can, but it will, by definition, not be streamed unless the processor decides to do so for other reasons outside the scope of the spec)

I think this sentence is not incorrect per se, but it is confusing. I suggest changing it to "allows the documents in a URI collection ....", or better "MAY allow...", because the relation between URI collection and streamable documents is not set. 

Also, this bullet point mentions "xsl:stream", though the only case where fn:uri-collection comes into play in conjunction with streaming is xsl:merge. The xsl:stream instruction does *not* accept a collection URI or multiple URIs.

The above remarks combined, I suggest something along the following lines:

<proposal>
In XSLT 3.0 it allows the documents in a URI collection to be processed in streaming mode, for instance by applying each URI to the xsl:stream instruction, or by using the result of fn:uri-collection as input for xsl:merge-source/@for-each-stream.
</proposal>
Comment 1 Liam R E Quin 2016-04-05 05:05:11 UTC
I think this proposed text is too XSLT-specific to be helpful for readers in another context.

In addition, I think the idea is that you call uri-collection() and then use doc() on each result, precisely to avoid the "grounding" nature of collection().

Maybe the bullet point could be clearer about that?
Comment 2 Abel Braaksma 2016-04-05 09:40:29 UTC
(In reply to Liam R E Quin from comment #1)
> In addition, I think the idea is that you call uri-collection() and then use
> doc() on each result, precisely to avoid the "grounding" nature of
> collection().
The fn:doc (and by extension, the XSLT function fn:document) is also grounded. The only way to get the functionality of fn:doc with streaming is with xsl:stream (and, to a lesser extend, with xsl:merge).

fn:doc had streaming abilities in an earlier draft of the spec, but this was dropped at some point in favor of the current streamability rules.
Comment 3 Abel Braaksma 2016-04-05 15:23:40 UTC
Discussed at telcon #638, the WG decided to leave the text as is, on the grounds that it is in an explanatory section and do not need to be written in excruciating detail.

Closing with solution WON'T FIX.