Understanding X-Query evaluation of a nested expression



for $a in distinct-values(doc("C:/BaseX/test/test1.xml")//author)


return count(doc("C:/BaseX/test/test1.xml")//book [exists(index-of(author, "Abiteboul"))] )


I don't understand how to evaluate this expression. How will it evaluate to a number greater than 1, because the exists expression will always return 1 or 0


text1.xml contains 5 books as the parent elements and authors as child elements.


No comments:

Post a Comment