<?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>29696</bug_id>
          
          <creation_ts>2016-06-16 14:39:43 +0000</creation_ts>
          <short_desc>[XSLT30] Dropping streamability of the global context item (GCI), in particular, xsl:global-context-item/@streamable</short_desc>
          <delta_ts>2016-07-21 16:39:47 +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>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>
          
          
          <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>126782</commentid>
    <comment_count>0</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2016-06-16 14:39:43 +0000</bug_when>
    <thetext>As a result of discussion in Bug 29670, and the follow-up discussion in https://lists.w3.org/Archives/Public/public-xsl-wg/2016Jun/0000.html and https://lists.w3.org/Archives/Public/public-xsl-wg/2016Jun/0001.html in the public archive and a decision in the XSL WG meeting of 9 June 2016, I was tasked with an action to create a bug report on dropping streamability on xsl:global-context-item.

Reasoning:
The current rules do not allow you to move away from the beginning of the first element of a GCI (any construct accessing the GCI must be motionless). As a result, the GCI cannot be accessed past its head.

Fixing this (i.e., allowing reading the whole stream) proved very hard to write down in spec rules.

Workaround:
The only use-case is getting information on the IMS (initial match selection) in cases where IMS and GCI are the same. This can be circumvented by writing a motionless accumulator that acts on the root node.

Decision:
The decision in the aforementioned XSL WG meeting was to drop this feature as it seems to serve no practical purpose and the rules are complex. The parts of the spec that needs updating are written out here: https://lists.w3.org/Archives/Public/public-xsl-wg/2016Jun/0001.html.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126784</commentid>
    <comment_count>1</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2016-06-16 14:56:55 +0000</bug_when>
    <thetext>For reference, a copy of the findings of &quot;what needs to change&quot; (from MK):

What needs to change?

Firsly, xsl:global-context-item/@streamable is dropped, and with it error XTDE3205, and list item 7 of 19.10 (Streamability guarantees).

In 2.3.2 (Priming a stylesheet) we should add a paragraph: The value given to a stylesheet parameter, or to the global context item, must not include a node in a streamed document. (Note: this ensure that the stylesheet can use the values of parameters and the global context item freely without being constrained by the streamability rules.)

And point out, perhaps in the second note of 2.3.2, that if the initial match selection is a streamed document, then the global context item must be something else (or be absent).

The new Note in 9.5 also needs to go (or to be rewritten).

What about xsl:global-context-item/@use-accumulators? The answer is that since the global context item is now unstreamed, rule 1 of 18.2.2 no longer applies (instead, rule 3 applies, and all accumulators are applicable). Therefore the xsl:global-context-item/@use-accumulators achieves nothing, so the attribute can be dropped.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126830</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-06-24 15:30:07 +0000</bug_when>
    <thetext>The changes were agreed and have been applied to the spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127022</commentid>
    <comment_count>3</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2016-07-21 16:39:47 +0000</bug_when>
    <thetext>Bug is now closed</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>