<?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>24342</bug_id>
          
          <creation_ts>2014-01-21 11:52:54 +0000</creation_ts>
          <short_desc>Non-grouping variable references are not streamable anymore</short_desc>
          <delta_ts>2014-05-15 14:00:44 +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>Last Call drafts</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>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Abel Braaksma">abel.braaksma</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          <cc>cmsmcq</cc>
          
          <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>98822</commentid>
    <comment_count>0</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2014-01-21 11:52:54 +0000</bug_when>
    <thetext>This bug was first raised on the xsl-wg mailing list [1]. I copy most of that mail here for convenience of tracking the details:

It seems that in the current Draft variable references of any kind, except when bound to bind-group/-source, are not allowed anymore under the guaranteed streaming rules. I.e.

let $a := 1
return $a

for $i in 1 to 20 return $i

&lt;xsl:variable name=&quot;b&quot; select=&quot;copy-of(foo)&quot; /&gt;
&lt;xsl:sequence select=&quot;$b/bar&quot; /&gt;

are all disallowed now. The reason is that under [1], we now have a list of rules &quot;first of the following that apply&quot; that have 1, 2 and 3 talk about bind-group/-source and 4 being &quot;otherwise roaming and free-ranging&quot;. Just beneath that, there&apos;s a line outside the list that says &quot;otherwise, the sweep of the expression is motionless&quot;.

[1] https://lists.w3.org/Archives/Member/w3c-xsl-wg/2014Jan/0014.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98823</commentid>
    <comment_count>1</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2014-01-21 11:53:57 +0000</bug_when>
    <thetext>Response in the xsl-wg mailing list from Michael Kay [1] was as follows:

Yes, something has clearly gone wrong here.

I suspect that the intent was that the &quot;Otherwise&quot; in rule 4 was intended to handle the case where one of (1a, 2a, or 3a) apply, while the &quot;Otherwise&quot; outside the list was intended to handle the case where none of these apply. There was probably some refactoring that went wrong.

[1] https://lists.w3.org/Archives/Member/w3c-xsl-wg/2014Jan/0015.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99765</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2014-02-05 10:50:12 +0000</bug_when>
    <thetext>*** Bug 24507 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100156</commentid>
    <comment_count>3</comment_count>
    <who name="C. M. Sperberg-McQueen">cmsmcq</who>
    <bug_when>2014-02-10 15:19:56 +0000</bug_when>
    <thetext>The WG discussed this during the Prague face-to-face meeting.

Editorial cleanup needed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100749</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2014-02-17 13:48:10 +0000</bug_when>
    <thetext>The rules have been refactored to remove the inconsistencies.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101851</commentid>
    <comment_count>5</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2014-03-04 18:12:59 +0000</bug_when>
    <thetext>Reopening the bug, because the change mentioned in bug 24535, which itself refers to this bug for its resolution, was not applied: 

Rule #4 does not mention the posture (which should be grounded).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103947</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2014-04-16 08:25:03 +0000</bug_when>
    <thetext>I am marking this as resolved because I believe it has disappeared as an issue as a consequence to the changes that eliminating grouping variables. Please reopen if this is not the case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104027</commentid>
    <comment_count>7</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2014-04-17 11:06:21 +0000</bug_when>
    <thetext>I concur. It now says &quot;variable references are grounded and motionless&quot;, period. As simple as that.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>