On 08/04/2014 16:23, Ihe Onwuka wrote:
count(colllection('myColl')//elem tells me how many elems there are in
myColl. Fine

So now I want to be told how many elems are in myColl and myColl2.

Put them in a sequence like so

(collection('myColl')//elem,collection('myColl2')//elem) and then
apply the count method to each element of the sequence n'est pas?

(collection('myColl')//elem,collection('myColl2')//elem)/count(.)




XPath sequences don't nest ((1,2,3),(4,5,6)) is (1,2,3,4,5,6) so your issue is nothing to do with count() but rather with the sequence you are constructing.

for $c in ('myColl','myColl2') return count(collection($c)//elem)


_______________________________________________
[email protected]
http://x-query.com/mailman/listinfo/talk

Reply via email to