EAD and XSLT stylesheets go together like grilled pear, port and roquefort. Whenever you convert one flavo(u)r XML to another, or convert XML to another format entirely, the chances are that XSLT is going to be involved.
This page is aimed at establishing and maintaining a shared space of stylesheets created by our community. Your stylesheets can be complete, proof-of-concept, started-but-not-quite-finished, under development, whatever. Just send them to this site's maintainer.
UNC_findingaid_functionality.zip
Objective: Instructions and code for adding three functionalities to your EAD Web display:
All code is from the 2009 finding aid Web display redesign at Wilson Library at the University of North Carolina at Chapel Hill. This zip file contains an HTML and XML file as well as a PDF file. The PDF contains the necessary XSL, CSS, and JavaScript code, instructions on how to integrate the modifications into your stylesheet, and some troubleshooting hints. The HTML and XML are an example finding aid.
AAAv2002-HTML.xsl
XSLT
This EAD 2002 stylesheet applies to the whole finding aid and is based on a Cookbook stylesheet which the Smithsonian Institution’s Archives of American Art uses with the EAD Cookook for NoteTab Pro tool developed by Chris Prom. The stylesheet has been modified extensively and now accommodates the four different container types that the Archives of American Art uses and/or combinations of those four containers as necessary.
ead_divs.xsl
XSLT
ead_divs.css
CSS
This style sheet applies to the entire finding aid. It is adapted from the EAD Cookbook style sheet eadcbs7.xsl. It formats component-level entries into paragraphs, instead of columns. It uses divs instead of frames to create the page layout, thereby avoiding screen reader compliance issues. It formats only components <c01> through <c03>, but can be edited to include additional components. It splits the finding aid into separate files at the Series level, to make large finding aids more manageable. Lines to be edited:
threecolumn_dsc.xsl
XSLT
threecolumn_dsc.css
CSS
This stylesheet applies to the <dsc> only, and provides a three-column table layout. Container values are output in the first two containers, and all descriptive information for components is output in the third column. Layout of embedded component levels is controlled through classes provided in the accompanying CSS stylesheet. It assumes that your institution uses two columns for container values, but you could easily modify it to be a two-column layout for single containers. The CSS does not include any styling other than setting up the classes that will control the display (such as indentation) for the different component levels' table cells.
eadprint-su.xsl
XSLT
eadprint.css
CSS
This is a style sheet that creates a stripped down "printer-friendly" HTML file - no links, no fancy colors, no TOC down the side but instead one at the beginning, minor changes to the order of some things, slightly smaller text so as to take up less pages, places any indexes at the end of the finding aid, etc. It forces one page break near the beginning so that every finding aid gets a "cover sheet" with the same information. It's a handy alternative to a PDF, for example. It goes with the eadprint.css and all font properties are set in the css, making it easy to change the appearance if desired. Note that users will want to change the logo callout on line 75 to that of their own institution.
ead2fo.xsl
XSLT
This proof-of-concept XSLT 1.0 stylesheet can be used to create an XML document encoded according to the XSL Formatting Object (XSL:FO, or just FO) specification. A FO document instance is the format that almost all formatting object processors use to create PDF, RTF or other "for print" file formats.
ead2fo.xsl
XSLT
This proof-of-concept XSLT 1.0 stylesheet, when applied to a valid EAD2002 instance document will attempt to (partially) create an XML instance dcoument encoded according tho the XML schema employed by Microsoft's Word 2003 word processor. Why would you want to do this? Well, why not? It's a step in the direction of being then able to edit your EAD in a standard word processor-- though, of course, you'll still need to get from WordML back to EAD...