query with objectref

I have two doctypes that one is conected to the other with objectref.
there is a pair doctype that has inself data from student doctype.
how can i get the data from the second doctype in xquery?
the to doctype are atached.
student.tsd (1.08 KB)

This topic has migrated to here: the other query with objectref posting.

Greetings,
Trevor.