Each of these viewers is a pure XSLT solution for the display of image files along with selected Descriptive, Administrative and Structural metadata elements of a digital object serialized into an xml-encoded METS document. They can easily be adapted to present links to audio or video files as well.
Because these servlet-based viewers require the use of keys I elected to write versions that deploy the latest avatar of XT (20020426a) and Saxon. They can also be deployed using Xalan or Cocoon with minimal adjustment.
The crux of these stylesheets involves a series of keys to move from the FILEID attribute of the fptr element in the structMap to the ID attribute for the file in the fileSec. Administrative metadata is available laterally through another key as an attribute of file. From the structMap it uses another key (dmdSecref using DMDID) to grab the descriptive metadata in the appropriate dmdSec. Keys make the xml file work like a database as they provide a lookup index for speed.
If you have a generation 5+ IE or Netscape browser, a demo file displays a photograph album containing 77 photographs, each with two jpgs, a thumbnail and a service file, from the New-York Historical Society's collections. The xml-encoded METS document was extracted using a Perl:DBI application from a database following NYU's zeroDB schema. The same file rendered with Saxon. This file is viewable in Generation 4 browsers as well as Opera and Mozilla.
Just for fun: a minimalist rendering of Rick Beaubien's paradigmatic sfquad.xml file. The same file rendered with capture metadata.
XT Stylesheet: SimpleMETSViewer.xsl
Saxon Stylesheet: SimpleMETSViewerSX.xsl
Sample METS document (two levels of affiliation): Test.xml
A Saxon version of the Edisto collection rendered by
a frames-based viewer
with an expandable TOC. In this version of the METS file the album has been broken down into a page hierarchy with several photographs per page on the level below. Navigation is thus from photograph to photograph on a particular page.
Frames-based Viewer with Expandable TOC: METSFrameSX.xsl
Sample METS document: (three levels of affiliation): Test2.xml
For XT, follow the usual directions for setting using xt.jar, xp.jar and sax.jar and adding the xt servlet and default stylesheet parameter to the web.xml file in Tomcat (we use version 3.2.3).
At present the default url for the xml file to be rendered is passed in as a parameter from this page, but it can be hard-coded into the stylesheet's url parameter for testing. Be sure to replace the null value with your own xml filename. If you wish to develop in Opera or Mozilla you must hardcode the filename parameter.
For Saxon, add saxon.jar (6.5+) to your Tomcat library and your CLASSPATH. Depending on the version of Tomcat you are running, you may find that you have to rename Tomcat's library versions of parser.jar and jaxp.jar to make them load last (or simply delete them if you won't be needing them in future).
These stylesheets are suitable for navigating a digital object with one level of filiation, such as the album and photograph configuration used in the demo. They will recursively process further child div elements, but merely present the descendents on the same page as the first-level child. Feel free to adapt them to your own needs in the case of deeper relationships.
The stylesheets has been designed for collections with item level description. They can now accommodate descriptive metadata from the dc, gdm and moa2 namespaces. Again, feel free to create your own keys against other descriptive or administrative extensions This is by no means intended to be a Procrustean bed, but rather a framework to build on.
The filename parameter will not be passed to navigate pages in Opera, Mozilla or Generation 4 browsers unless it is hardwired into the stylesheet (N.B. it is not in the xt demo file). Dynamic parameter passing has, however, been tested in IE 5 & 6 and Netscape 6.
Since XSLT template matching is case-sensitive, pay special attention to casing in attributes', elements' and name-spaces' Q-Names.
These files are distributed "as is" and without promise of support. Questions/suggestions may however be directed to Eric Stedfeld, NYU Digital Library Team.