Normally, you would assume that a name and the corresponding movies are grouped under a common XML tag, as the previous replies suggest, or that you have a separate document for each actor. Then you could query:
for $doc in collection("ino:etc")
where $doc/root/name="George"
return $doc/root/movie
Now, with the modelling you currently have, a query such as
for $doc in collection("ino:etc")
let $name:=$doc/root/name[.="George"]
let $name1:=$doc/root/name[. >> $name][1]
return $doc/root/movie[. >> $name and . << $name1]
does the job. But I really recommend changing the DTD
Best regards
Harald
regards
Harald
#webMethods#Tamino#API-Management