grantExaminerRights(ident uid, ident username, ident examId) { assume exists /account[uid]/admin; assume exists /account[username]; # implicitly true in OO implementations assume exists /exam[examId]; assume not exists /account[username]/examiner[examId]); assume not exists /exam[examId]/examiner[username]); # implied by integrity and the assumption before insert /account[username] <examiner exam=[examId] />; insert /exam[examId] <examiner account=[username] />; }