I'm not sure how many people ever worry about formatting authority records, but we've been working on an interface to the Virtual International Authority File (VIAF) which needs to do just that. Since we're retrieving these records via SRU, they come back in MARC-XML and I put together an XSLT script for the display. I like it. It has improvements over Connexion's display
, in that the dates and times are formatted for readability. The records for the two images aren't the same, since the display from VIAF is the PND record from DDB and has extra information pulled in from associated bibliographic records to aid in matching.
If you are interested, here is the XSLT file and the associated CSS script. I wasn't sure what the rules are for adding the century to the 008's 6-byte date-entered field, so I just guessed. If anyone has suggestions on how these records should be formatted, please let me know.
--Th
Update (2005-08-08): I've updated the script to handle the dates properly and taken out the reference to viaf.js. There's still a reference to another .css file, but it does work without it.
Update (2005-08-09): See post http://outgoing.typepad.com/outgoing/2005/08/embedding_xslt_.html for a pointer to an easier stylesheet to view.
--Th
Neato, this could come in very handy. I'm kind of an XSLT novice so I had never seen JavaScript being referenced in an external file before. Does this require the user run the transformation in a browser, or are there XSLT libs that bundle JavaScript support. I was curious, so I went digging around for js/viaf.js to see what functions in the XSLT it was using but I couldn't seem to find it.
Posted by: Ed Summers | August 08, 2005 at 15:55
Here is the information on LC's Web site for handling dates in MARC records that contain 2 digit years.
Here is the XSL I use for creating a variable based upon the 008's date created:
Posted by: Andrew Houghton | August 08, 2005 at 20:59
Including viaf.js was an oversight--the authorities full display doesn't use it at all. It got cut & pasted from the main XSLT script that controls the interface.
All the Javascript calls in the interface are from the generated HTML to the JavaScript (which may then modify the HTML). It's possible to control XSLT from the JavaScript in some browsers, but I haven't tried it.
Thanks for the pointer and code Andy, I'll update the script.
--Th
Posted by: Thom | August 08, 2005 at 21:30