<?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>24508</bug_id>
          
          <creation_ts>2014-02-05 03:48:39 +0000</creation_ts>
          <short_desc>xsl:fork streamability rule #2</short_desc>
          <delta_ts>2014-08-02 13:26:46 +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>normal</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>99740</commentid>
    <comment_count>0</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2014-02-05 03:48:39 +0000</bug_when>
    <thetext>The second rule of 19.8.4.19 Streamability of xsl:fork (http://www.w3.org/TR/xslt-30/#streamability-xsl-fork) is ambiguous in the part &quot;not grounded and motionless&quot;. Does it mean &quot;not grounded and also not motionless&quot;, or does it mean &quot;not the both of grounded and motionless&quot;.

At any rate, I think that part can be removed, because even when grounded and/or motionless, the rule is still applicable: the result of xsl:fork with one xsl:sequence is the result of the streamability analysis of xsl:sequence.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100290</commentid>
    <comment_count>1</comment_count>
    <who name="C. M. Sperberg-McQueen">cmsmcq</who>
    <bug_when>2014-02-11 15:25:20 +0000</bug_when>
    <thetext>We discussed this in Prague.

For &quot;that is not grounded and motionless&quot; read &quot;that is not both grounded and motionless&quot; (or some equivalent).

We considered dropping the qualification entirely before realizing that we mustn&apos;t.

The &quot;that&quot; is restrictive; not all readers saw this at once, so if there is a way to make it clearer, it might be helpful.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100733</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2014-02-17 08:10:11 +0000</bug_when>
    <thetext>I have fixed this by reordering the rules. Since rule 4 requires that all the xsl:sequence instructions are grounded, we can move this rule earlier and simplify the subsequent rules.

I also noted (and fixed) that the current rules say that if all the xsl:sequence instructions are motionless, the result is consuming. This is clearly wrong.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101827</commentid>
    <comment_count>3</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2014-03-04 11:12:28 +0000</bug_when>
    <thetext>The bottom line of streamaiblity of xsl:fork is that xsl:sequences must be grounded, and then the widest sweep counts. Hence, I suggest to simplify this even further, as follows:

1. If the posture of any of the child xsl:sequence instructions is not grounded, then roaming and free-ranging.

2. Otherwise, the posture is grounded and the sweep is the widest sweep of any of the xsl:sequence children (or motionless if there are no children).

This then gets more in line with the xsl:map streamability rules, (which is only slightly different because xsl:map-entry has different rules than xsl:sequence).

----
If we decide to stick to the current rules, note:
The current rule #4 has a typo: &quot;then the grounded...&quot; =&gt; &quot;then grounded...&quot;.

----
As a result of the new rules, the last paragraph has become redundant. The rule about &quot;exactly one child&quot;, for which I filed this bug, is now gone, which I think is the right thing to do: why allow an exceptional case for which xsl:fork is pointless anyway?

The last para, should probably go:

&quot;The only case where xsl:fork is permitted to return streamed nodes is in the case where only one of the xsl:sequence instructions is consuming (in which case the xsl:fork instruction is pointless).&quot; 

(I took the liberty to reopen the bug report, it was closed)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106046</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2014-05-15 14:57:26 +0000</bug_when>
    <thetext>The suggestions in comment #3 are essentially editorial; they simplify the rules while leading to the same outcome. I have therefore accepted and applied the changes suggested.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>