[xquery-talk] arrow operator

Michael Kay mike at saxonica.com
Tue Aug 1 09:58:25 PDT 2017


In the case of singletons there's very little difference, but (as I now see Christian has pointed out), with sequences the effect is quite different.

Also, of course, "!" changes the context item, so

@address => replace(@postcode, "", "q") works, while

@address ! replace(@postcode, "", "q") doesn't.

Michael Kay
Saxonica

> On 1 Aug 2017, at 13:27, W.S. Hager <wshager at gmail.com> wrote:
> 
> Hi,
> 
> Is there any advantage to using the 3.1 arrow operator over the simple map operator?
> 
> $string => upper-case() => normalize-unicode() => tokenize("\s+")
> 
> versus
> 
> $string ! upper-case(.) ! normalize-unicode(.) ! tokenize(.,"\s+")
> 
> Thanks,
> Wouter
> _______________________________________________
> talk at x-query.com
> http://x-query.com/mailman/listinfo/talk




More information about the talk mailing list