at2oac: Stylesheet for post-processing AT EAD outputs (for delivery to the Online Archive of California)

at2oac is a simple stylesheet that can be used to post-process Archivists' Toolkit EAD outputs, in order to bring the files into conformance with the Online Archive of California's (OAC) encoding specifications:

http://bitbucket.org/btingle/at2oac/src

The OAC's encoding specifications are derived from the RLG Best Practice Guidelines for Encoded Archival Description. at2oac could hence be easily adapted by other repositories interested in generating Archivists' Toolkit EAD outputs that conform to the RLG specifications.

To run oac2at, you can use a free XSLT processor such as libxml2/libxslt or Saxon. To summarize the changes that it makes:

1) Adds a type attribute to dsc (uses supplied XSLT parameter dsc-type or default value of 'combined')
2) Copies repositorycode and countrycode from eadid to archdesc/did/unitid (or uses supplied XSLT paramters repositorycode / countrycode).
3) Converts the country code to uppercase as per the schema.
4) Defaults to removing did/container/@label or copies to did/physdesc if the stylesheet parameter label-to-physdesc is unset.
5) Defaults to stripping out xsi:schemaLocation and putting the ead into xmlns=""; to preserve xsi:schemaLocation and xmlns="urn:isbn:1-931666-22-9" use stylesheet parameter strip-namespace of something other than 'yes'.