This is an old revision of the document!
addStudentId(ident uid, ident username, string id) {
assume exists //accounts/account[uid]/admin;
assume exists //accounts/account[username]; # implicitly true in OO implementations
assume not exists //accounts/account[username]/student;
assume count(id, //accounts/account/student/id) = 0;
insert //accounts/account[username] <student id=[id] />;
}