Tech Blog

WebVoyage 7 (Tomcat) Addition of OCLC “Cite This Item” Link

  • DescriptionAdd a link in your Action Box to WorldCat “Cite This item.” Works using OCLC number for both monographs and serials.
  • Author: Laura Guy
  • Additional author(s):
  • Institution: Colorado School of Mines
  • Year: 2009
  • 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

State

Stable

Programming language

XSL/XML

Software requirements

Voyager

Screen captures

Click on attachments to view full-sized images.

Image1oclc.jpg

Image2oclc.jpg

Author(s) homepage

http://inside.mines.edu/~lguy

Working example

http://catalyst.coalliance.org

Using the following Ex Libris open interfaces

Tomcat

Installation instructions (part I)

Create your XSL file (in our case we named it isbnoclcCite.xsl but the filename is a misnomer because ISBN is not used here)

<Code sample>
<?xml version="1.0" encoding="UTF-8"?>
<!--
#(c)#=====================================================================
#(c)#
#(c)#       Copyright 2007 ExLibris Group
#(c)#            All Rights Reserved
#(c)#
#(c)#=====================================================================
-->
<!--
**          Product : WebVoyage :: csm_oclc_link
**          Version : 7.0
**          Created : 06-NOV-2008
**      Orig Author : Laura Guy and Jim Robinson
**    Last Modified : 02-JUL-2009
** Last Modified By : Laura Guy and Jim Robinson
-->
<xsl:stylesheet version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:page="http://www.exlibrisgroup.com/voyager/webvoyage/page"
   xmlns:fo="http://www.w3.org/1999/XSL/Format">

 <xsl:template name="recordIsbnCiteoclc">
  <xsl:variable name="OCLC">
   <xsl:call-template name="trimData">
    <xsl:with-param name="sData">
     <xsl:call-template name="BMDProcessMarcTags">
      <xsl:with-param name="field" select="'035'"/>
      <xsl:with-param name="indicator1" select="'X'"/>
      <xsl:with-param name="indicator2" select="'X'"/>
      <xsl:with-param name="subfield" select="'a'"/>
      <xsl:with-param name="mfhdID" select="$bibID"/>
      <xsl:with-param name="recordType" select="'bib'"/>
     </xsl:call-template>
    </xsl:with-param>
   </xsl:call-template>
  </xsl:variable>
  <xsl:variable name="OCLC2">
   <xsl:if test="translate($OCLC , '()ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz','')">
    <xsl:value-of select="translate($OCLC , '()ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz','')"/>
   </xsl:if>
  </xsl:variable>

  <a target="_blank">
   <xsl:attribute name="href"><xsl:value-of select="$OCLC2"/>?page=citation&amp;client=worldcat.org-detailed_record</xsl:attribute>Cite this Item
  </a>
 </xsl:template>
</xsl:stylesheet>
</Code sample>

Back up your file before making changes.  Comment your work.
Note template name is recordIsbnCiteoclc
File location: /m1/voyager/xxxdb/tomcat/vwebv/context/vwebv/ui/skin/xsl/pageFacets

Installation instructions (part II)

Edit the top of your displayFacets.xsl file to include the previous xsl file

<Code sample>
#(c)#       Copyright 2007 ExLibris Group
#(c)#            All Rights Reserved
#(c)#
#(c)#=====================================================================
-->
<!--
**          Product : : WebVoyage : displayFacets
**          Version : 1.0
**          Created : 26-OCT-2007
**      Orig Author : David Sellers
**    Last Modified : 03-APR-2008
** Last Modified By : Mel Pemble
**      Modified By : Laura Guy - 5/15/08 - to add static More Info links
**      Modified By : Laura Guy - 12/08/08 - remove bullets from more info links
**      Modified By : Laura Guy - 06/30/09 - to add social bookmarks
**      Modified By : Laura Guy - 07/02/09 - to add worldcat citation link
--><xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 xmlns:page="http://www.exlibrisgroup.com/voyager/webvoyage/page"
 xmlns:fo="http://www.w3.org/1999/XSL/Format"
 xmlns:hol="http://www.endinfosys.com/Voyager/holdings"
  xmlns:slim="http://www.loc.gov/MARC21/slim">

<xsl:include href="../local_googleBooksAvail.xsl"/>
<xsl:include href="./infoLocation.xsl"/>
<xsl:include href="./infoStatus.xsl"/>
<xsl:include href="./isbnprSearch.xsl"/>
<xsl:include href="./isbnwcSearch.xsl"/>
<xsl:include href="./isbnoclcCite.xsl"/>
</Code sample>

Back up your file before making changes.  Comment your work.
File location: /m1/voyager/xxxdb/tomcat/vwebv/context/vwebv/ui/skin/xsl/pageFacets

Installation instructions (part III)

Then call the template lower down in the displayFacets.xsl file (look for: <div id=”oclcCite”>)

<Code sample>
            <xsl:for-each select="page:element[@nameId='actionBox.moreAboutThisItem.group']">

                <div class="moreInfo">

                    <label><xsl:value-of select="page:label"/></label>
                    <h2 class="nav">Action Box More Info Navigation</h2>
                    <ul title="Action Box More Info Navigation" class="moreInfo">

                        <xsl:for-each select="page:element">
                            <li>
                                <xsl:call-template name="buildImageUrl">
                                    <xsl:with-param name="eleName" select="@nameId"/>
                                </xsl:call-template>
                            </li>
                        </xsl:for-each>
                    </ul>
                </div>
<div id="infoLocation">
<ul><li>             <xsl:call-template name="infoLocation" />
</li></ul>
             </div>
             <div id="infoStatus">
<ul><li>            <xsl:call-template name="infoStatus" />
</li></ul>
             </div>
                       <div id="oclcCite">
<ul><li>             <xsl:call-template name="recordIsbnCiteoclc" />
</li></ul>
            </div>
            <div id="prospSearch">
<ul><li>             <xsl:call-template name="recordIsbnSearch" />
</li></ul>
            </div>
            <div id="wcSearch">
<ul><li>             <xsl:call-template name="recordIsbnSearchwc" />
</li></ul>
            </div>
             <br />
</Code sample>

You call the template name, not the filename.
Always back up your file before making changes.  Comment your work.
File location: /m1/voyager/xxxdb/tomcat/vwebv/context/vwebv/ui/skin/xsl/pageFacets

Installation instructions (part IV)

Finally edit your webvoyage.properties file to add your new section

<Code sample>
###########################################################################
#
# Holdings Information Section
#
###########################################################################
holdingsInfo.page.title=Catalyst Holdings Information
holdingsInfo.page.heading=Holdings Information
holdingsInfo.page.label=Bibliographic Details

#========================================================
# Action box on the holding information page
#========================================================
actionBox.thisItem=This item
actionBox.recordView.linkText=Record View
actionBox.staffView.linkText=Staff View
actionBox.actions=Actions
actionBox.actions.makeRequest.order=1
actionBox.actions.makeRequest.linkText=Make a Request
actionBox.actions.makeRequest.link.posttext=(e.g. Hold, Recall, Request)
actionBox.actions.print.order=2
actionBox.actions.print.linkText=Print
actionBox.actions.export.order=3
actionBox.actions.export.linkText=Export
actionBox.actions.email.order=4
actionBox.actions.email.linkText=E-mail
#NOTE the option.email variable must be Y in order for the email link to appear.
actionBox.actions.addToList.order=5
actionBox.actions.addToList.linkText=Add to My List
# This additional section is additional Library Information
# LG
actionBox.moreAboutThisItem=More Library Information:
# Added links follow above heading
# actionBox.openURL properties in holdingsInfo.X.properties
# actionBox.requestURI properties in holdingsInfo.X.properties
</Code sample>

Note the “actionBox.moreAboutThisItem=More Library Information:” line above.
Always back up your file before making changes.  Comment your work.
File location: /m1/voyager/xxxdb/tomcat/vwebv/context/vwebv/ui/skin/

Comments

Thanks to Jim Robinson for help with the OCLC WorldCat code. Please contact me if this doesn’t make sense. It does assume you have some basic knowledge.

 

Leave a Reply