The old XQuery-based way of generating OAI files was very time-consuming and required an offline Cocoon/eXist to run. I've now completely rewritten it as a single XSLT transformation, which takes about a minute to generate all the files. It has a couple of parameters we can tweak if we decide to change ids to remove the .scx, and it builds the files to a separate folder. I'm going to combine it with a shell script that will:
- Note the time.
- Generate all the files.
- Copy them over into the original folder.
- svn delete any files which have timestamps older than the start time, because that means their despatch files have gone.
- svn add all files (in case there are new ones).
- svn propset all files (ditto).
- svn commit
- Clean out the directory on the eXist server.
- Repopulate the directory.