<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>29698</bug_id>
          
          <creation_ts>2016-06-18 12:53:43 +0000</creation_ts>
          <short_desc>[XSLT30] Streamable merging does not require streamability checking anymore</short_desc>
          <delta_ts>2016-10-06 18:42:23 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XSLT 3.0</component>
          <version>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Abel Braaksma">abel.braaksma</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>126794</commentid>
    <comment_count>0</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2016-06-18 12:53:43 +0000</bug_when>
    <thetext>The text in 19.10 currently says:

&lt;quote&gt;
Specifying streamable=&quot;yes&quot; on xsl:merge declares that the merging process is streamable.
&lt;/quote&gt;

But in fact, it is an attribute of xsl:merge-source. Also, this attribute is implicitly &quot;yes&quot; 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&apos;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 &quot;guaranteed-streamable&quot;. So perhaps a different wording should be used here?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126795</commentid>
    <comment_count>1</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2016-06-18 13:03:13 +0000</bug_when>
    <thetext>Oops, not entirely correct. The xsl:merge-source/@select expression is bound to certain rules to be guaranteed streamable:

&lt;quote&gt;
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.
&lt;/quote&gt;

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:

&lt;quote&gt;
Specifying streamable=&quot;yes&quot; 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.
&lt;/quote&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126895</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-07-06 22:52:44 +0000</bug_when>
    <thetext>Having carefully re-read the relevant sections, I think the only change needed is that in 19.10, the sentence

Specifying streamable=&quot;yes&quot; on xsl:merge declares that the merging process is streamable.

should change to

Specifying streamable=&quot;yes&quot; (implicitly or explicitly) on xsl:merge-source declares that the merging process is streamable with respect to that particular input.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126897</commentid>
    <comment_count>3</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2016-07-07 00:28:45 +0000</bug_when>
    <thetext>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&apos;s an argument for adding a Note similar to my suggestion in comment #1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126941</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-07-10 17:02:23 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>