XML Source:
School A Student A
Use:
/schools/school[student[not(../../school/student/id > id)]]/name
Or shorter (just for this schema):
/*/school[*/id[not(//id > .)]]/name