[xquery-talk] A walk down Sesame St - counting for simpletons

Andrew Welch andrew.j.welch at gmail.com
Tue Apr 8 09:43:53 PDT 2014


On 8 April 2014 17:29, Andrew Welch <andrew.j.welch at gmail.com> wrote:
> On 8 April 2014 17:08, David Carlisle <davidc at nag.co.uk> wrote:
>> On 08/04/2014 17:04, Ihe Onwuka wrote:
>>>
>>> yes, for some reason I strenuously avoid using the for version of
>>> Flowr syntax so abandoned my attempt without considering it.
>>
>>
>>
>> well you could use ! instead, I don't have a version 3 to hand but I think
>> it would be
>>
>>
>> ('myColl','myColl2')!count(collection(.)//elem)
>
> It's been a while but I think eXist's collection() implementation can
> take a sequence:
>
> count( collection(('myColl', 'myColl2'))//elem )
>
> MarkLogic, Saxon etc all take sequences

^^^ which is of course different to what DC posted... his provides a
count of per collection, but the latter does the count across
collections.

-- 
Andrew Welch
http://andrewjwelch.com


More information about the talk mailing list