The output, so far as it goes, is the desired result.
the nested for loop of the query is comprehensible, but perhaps not "Xquery"-ish?
That a book h