This is an old revision of the document!
# pretty much the canonical addStudent procedure
addStudentId(ident username, string id) {
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] />;
}