<?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>29449</bug_id>
          
          <creation_ts>2016-02-11 22:35:05 +0000</creation_ts>
          <short_desc>[xslt 3.0] Streamability of $map($key) and $array($index)</short_desc>
          <delta_ts>2016-02-19 12:29:54 +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>All</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="Michael Kay">mike</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>125001</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-02-11 22:35:05 +0000</bug_when>
    <thetext>In 

19.8.8.10 Streamability of Dynamic Function Calls

It would be useful to explain the effect of these rules on dynamic function calls where the &quot;function&quot; in question is a map or an array.

Intuitively, if we know that the &quot;base expression&quot; (the function) is a map or an array, and the argument is motionless, then the dynamic function call itself is motionless; if we don&apos;t know (because the type analysis doesn&apos;t tell us), then we can&apos;t determine that the expression is guaranteed-streamable, and the user should be advised to write map:get($map, $key) or array:get($array, $index) instead; or perhaps to use the &quot;?&quot; lookup operator if XPath 3.1 is available.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125053</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-02-15 16:27:17 +0000</bug_when>
    <thetext>Resolution: add a note to the spec along the following lines:

Note that in a dynamic function call $F($A), the operand usage of $F is inspection, so what is passed to $F has no direct bearing. As for $A, if we know that $F is a map or array, then we know that $A has usage absorption (because the inferred type is xs:anyAtomicType), and therefore passing a streamed node is OK (the result will be consuming), but if we don&apos;t know that $F is a map or array, then passing a streamed node will be roaming/free-ranging.

So advice is users is: if you want it to be streamable, make sure $F is declared to be a map or array, or use an alternative construct such as $F?($A) (3.1) or map:get($F, $A).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125159</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-02-19 12:29:54 +0000</bug_when>
    <thetext>The spec has been updated along the lines agreed.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>