On 04/08/2014 11:23 AM, Ihe Onwuka wrote:
That should give you the total count of both. You are thinking that you have a sequence of sequences, but you don't since there is no such thing in XPath -- only sequences of items (nodes and atomic values).count(colllection('myColl')//elem tells me how many elems there are in myColl. FineSo 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(.) 2 collections to give me 2 numbers .C'est domage, Mais non. That only gives me one number - the count of elems in MyColl.
C'est fait rien methinks (or perhaps doesn't think). 3.0 map operator to the rescue - let's substitute the / for a !. Sacre bleu I now have a stream of N 1's where N is the number of elems in MyColl............ I have gone back to the more prosaic method of counting each collection with a comma separator to transform the answer to a sequence. _______________________________________________ [email protected] http://x-query.com/mailman/listinfo/talk
_______________________________________________ [email protected] http://x-query.com/mailman/listinfo/talk
