This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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 "function" in question is a map or an array. Intuitively, if we know that the "base expression" (the function) is a map or an array, and the argument is motionless, then the dynamic function call itself is motionless; if we don't know (because the type analysis doesn't tell us), then we can'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 "?" lookup operator if XPath 3.1 is available.
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'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).
The spec has been updated along the lines agreed.