Hi Daniël,
the XQuery 3.1 grammar has not been finalized yet, but I agree that
our implementation is not what one would expect. I have tracked your
observation [1] and will let you know when a fix is available.
Thanks,
Christian
[1] https://github.com/BaseXdb/basex/issues/755
___________________________
2013/9/18 Daniël Knippers <dknippers@gmail.com>:
> _______________________________________________> Hi,
>
> Using the new map syntax of BaseX 7.7.1, I ran into this:
>
> let $m := { 'key':'val' }
> return $m('key')
>
> [XPST0003] Invalid key, simple expression expected.
>
> As it turns out, a space is required after the closing quote of the key.
> That is, the above example works fine when replacing 'key':'val' by
> 'key'<SPACE>:'val'
>
> This is not the case when using an integer key, i.e. this works fine:
>
> let $m := { 1:'val' }
> return $m(1)
>
> I'm not sure if this behavior is intentional, but I would guess it is not
> :-)
>
> Regards,
> Daniël
>
> BaseX-Talk mailing list
> BaseX-Talk@mailman.uni-konstanz.de
> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
>