Re: [basex-talk] Trouble with wildcard lookup operator on maps?

2015-08-15 Thread Marc van Grootel
Hi Christian, Ok, that clears it up. Somehow I suspected this, but I was thrown by the statement in the spec (and my faulty intuition) that says: If the KeySpecifier is a wildcard ("*") and the context item is a map, unary lookup is equivalent to the following expression: for $k in

Re: [basex-talk] Trouble with wildcard lookup operator on maps?

2015-08-15 Thread Christian GrĂ¼n
Hi Marc, The result is correct: The FOR clause of the FLWOR expression always binds one item at a time. If you want to bind sequences, you should use arrays in your map constructor: let $map := map { 'a': [1,2,3], 'b': [4,5,6] } return $map?* Hope this helps, Christian On Sat, Aug 15, 201

[basex-talk] Trouble with wildcard lookup operator on maps?

2015-08-15 Thread Marc van Grootel
Hi, Unless I'm not reading the spec[1] correctly then the following two snippets should have the same result: Example 1: let $map := map { 'a': (1,2,3), 'b': (4,5,6)} for $k in map:keys($map) return array { $map($k) } Example 2: let $map := map { 'a': (1,2,3), 'b': (4,5,6)}