[Bug 21963] Implicit iteration on dynamic function calls

https://www.w3.org/Bugs/Public/show_bug.cgi?id=21963

--- Comment #5 from Jonathan Robie <jonathan.robie@gmail.com> ---
I agree that the main use case is selection from a sequence of maps (it also
applies to arrays). A sequence of maps can occur because:

* The result of a query on JSON is a sequence of maps
* FLWOR expressions create sequences of maps
* Maps occur in a collection
* A view of relational or object data creates sequences of maps

Consider the following example:

let $maps := ( { "a" : 1 }, { "b" : 2 }, { "c" : 3 } )
return $maps("b")

Currently, that raises an error. This does not:

let $maps := ( { "a" : 1 }, { "b" : 2 }, { "c" : 3 } )
return $maps?b

We currently have two syntaxes that mostly do the same thing, one iterates but
can never support all keys, the other supports all keys but does not iterate.
That makes the language confusing.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 27 May 2014 14:59:15 UTC