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

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


Happy to be the plonker if I'm wrong but:

($seq)/count(.)

will only ever produce a sequence of 1s (or 0 when $seq is empty)...

If you are saying otherwise please provide small complete runnable
sample so I recreate it.  (and please really do provide an actual
sample of runnable code that really does show it)



On 8 April 2014 16:50, Ihe Onwuka <ihe.onwuka at gmail.com> wrote:
> ....but that my dear plonker..... does not return a stream of ones......Oops!
>
> On Tue, Apr 8, 2014 at 4:43 PM, Andrew Welch <andrew.j.welch at gmail.com> wrote:
>>> (collection('myColl')//elem,collection('myColl2')//elem)/count(.)
>>
>> ^^^ that constructs a sequence of <elem>s, and then supplies each one
>> to the count() function... so it will just a return a load of 1s.
>>
>> Bonney dee doosh, ala quet de mer, rodders.
>>
>> --
>> Andrew Welch
>> http://andrewjwelch.com



-- 
Andrew Welch
http://andrewjwelch.com


More information about the talk mailing list