[xquery-talk] xquery 3.1 wishlist
Michael Kay
mike at saxonica.com
Fri Jun 26 05:16:40 PDT 2015
I would think both of these could be implemented as user-defined functions but it’s hard to know without seeing a specification: saying you want a function called array:index-of() is not very informative unless you explain exactly what you want the function to do.
If it’s to behave like fn:index-of() then you can write it as
array:index-of($array, $value) {
(1 to array:size($array))[ $array(.) = $value ]
}
which is hardly a great hardship to write as a user-defined function.
Michael Kay
Saxonica
> On 26 Jun 2015, at 12:18, W.S. Hager <wshager at gmail.com> wrote:
>
> Hello,
>
> I've been working with the recent xquery 3.1 implementation in the develop branch eXist-db. I encountered some cases that were quite hard to work around:
>
> - the lack of array:index-of()
> - the lack of the iterator index in arrayfor-each and related higher-order functions
>
> Perhaps someone of the workgroup is available to discuss those cases.
>
> Thanks,
> Wouter
> --
> W.S. Hager
> Lagua Web Solutions
> http://lagua.nl <http://lagua.nl/>
>
>
> --
> W.S. Hager
> Lagua Web Solutions
> http://lagua.nl <http://lagua.nl/>
>
> _______________________________________________
> talk at x-query.com
> http://x-query.com/mailman/listinfo/talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://x-query.com/pipermail/talk/attachments/20150626/96decb67/attachment.html>
More information about the talk
mailing list