Built a fresh checkout of eXist trunk, and reworked the app to run in it. Had to change relative paths to XSL files in XQL files to full paths from /db for some reason. Also fixed a bug in the personography rendering, which after much confusion turned out to be caused by my having moved the schemas around in the db. Only thing left to do: add password protection.