jQuery made easier using ids in record displays for WebVoyage 7 Tomcat
Tags: jquery
, javascript
, intermediate
, bibliographic
, webvoyage
, tomcat
, webservices
, api
, alternative
Last Updated: Dec 13, 2010 21:37
- Description
I liked the look of the Primo display for Library items, where more details were provided when you click on tabs. I thought I would see if I could make our catalogue provide similar functionality, and this also provides an alternative to creating a "brief display".
If you're using jQuery, (or something else), to pull data from the Bib record display through to other sources, it's a lot easier if you can easily identify the bits you want. This provides a way to make WebVoyage TomCat give the data you want without having to use the Voyager WebServices APIs. Currently, the Bib record data is a list of data elements which are hard to identify - this XSL code lets you add descriptive identifiers to each piece of bibliographic data, so you can use jQuery to load them into other pages, etc. - Author: Tom Pasley
- Additional author(s):
- Institution: Universal College of Learning
- Year: 2010
- License: BSD style
- Short description: Use, modification and distribution of the code are permitted provided the copyright notice, list of conditions and disclaimer appear in all related material.
- Link to terms: [Detailed license terms]
- Skill required for using this code:
Intermediate- though be warned, this is extremely geeky!
State
'Relatively Stable'
Programming language
XSL/XML
Software requirements
TomCat Webvoyage
Screen captures
Place your screen shot here...
Author(s) homepage
Download
There are no files to download.
Working example
Our sandbox'd skin
http://libcat.ucol.ac.nz/vwebv/searchBasic?sk=sandbox
Using the following Ex Libris open interfaces
None - just existing
Changes
Version 1.2 ....
Text...
Version 1.1 ....
Text...
...
Text...
Release notes
This is what I was aiming for - you click on a tab, it expands, with more details:
Installation instructions
Changes are made to display.xsl, located under /xsl/contentLayout/display.
Add this just before the closing tag for the XSL stylesheet: </xsl:stylesheet>
Basically, the idea is to include a call-template under each variable for bibTag like so:
And then incorporate the identifier when it's time to create the HTML output like so:
I have not shown all of the changes which I've incorporate to give the fieldData identifiers (etc...), but hopefully you get the idea? Contact me if this is something you want to do, and I'll fill you in on the gaps! ![]()
| HTML source : Before implementing additional code |
| HTML source : After implementing additional code |
| This will let you do jQuery magic such as: |
This is my functional proof of concept on our sandbox skin, (our released skin will look nicer, and have different colours),: 
TO DO list
I'll post a reference display.xsl once we've upgraded to 7.2.3 - currently there are other modifications in this XSL as well.
Known issues
Will add a little overhead to the processing of bib record pages... (not any that I've noticed though).
Comments
The aim is to provide a reliable method to extract certain bibliographic information from the record view for use in other interfaces (or applications?). This is done by using the code provided to create identifiers which are then added to underlying HTML code.
Please add a comment to let me know how this works for you!

