{
for $movie in distinct-values(doc("movies.xml")/movies/movie)
where count(doc("movies.xml")/movies/movie[title=$movie/title]) = count(distinct-values(doc("movies.xml")/movies/movie/source))
return
<title> {$movie/title} </title>
}
In this particular query I am tryin to : Find movie titles that are offered from all sources in the "movies" document. I am getting an error on the line of the where clause. the error is : Required item type of first operand of '/' is node(); supplied value has item type xs:anyAtomicType