h1

A useful modification to SirsiDynix HIP

2006-07-20

We have about a dozen autonomous libraries sharing a HIP server and a Horizon datasource.  The standard behavior for Horizon Information Portal is to say “You’re searching: Tampa Bay Library Consortium“, since our datasource is called ‘Tampa Bay Library Consortium’.

But most patrons don’t really know what the Tampa Bay Library Consortium is.  They know that they’re at the Safety Harbor Public Library (or wherever they are).

So the libraries wanted to have their own names on the catalog, rather than ours.  Fair enough.

Here’s a modified template from toolbar2.xsl (HIP 3.0.6A):

<xsl:template name="find_source_label_by_id">
<xsl:param name="source_id"/>
  <xsl:choose>
    <xsl:when test="/searchresponse/profile = 'fyb'">
      <xsl:text>Easter Library at Clearwater Christian College</xsl:text>
    </xsl:when>
    <xsl:when test="/searchresponse/profile = 'fybr'">
      <xsl:text>Easter Library at Clearwater Christian College (RESERVES)</xsl:text>
    </xsl:when>
    <xsl:when test="/searchresponse/profile = 'fdl'">
      <xsl:text>Dunedin Public Library</xsl:text>
    </xsl:when>
    <xsl:when test="/searchresponse/profile = 'fsc'">
      <xsl:text>Roux Library at Florida Southern College</xsl:text>
    </xsl:when>
    <xsl:when test="/searchresponse/profile = 'fscr'">
      <xsl:text>Roux Library at Florida Southern College (RESERVES)</xsl:text>
    </xsl:when>
    <xsl:when test="/searchresponse/profile = 'fla'">
      <xsl:text>Largo Public Library</xsl:text>
    </xsl:when>
    <xsl:when test="/searchresponse/profile = 'fyi'">
      <xsl:text>New Port Richey Public Library</xsl:text>
    </xsl:when>
    <xsl:when test="/searchresponse/profile = 'fvu'">
      <xsl:text>Oldsmar Public Library</xsl:text>
    </xsl:when>
    <xsl:when test="/searchresponse/profile = 'sm'">
      <xsl:text>Pinellas Public Library Cooperative</xsl:text>
    </xsl:when>
    <xsl:when test="/searchresponse/profile = 'fyh'">
      <xsl:text>Remington College</xsl:text>
    </xsl:when>
    <xsl:when test="/searchresponse/profile = 'fyhr'">
      <xsl:text>Remington College (RESERVES)</xsl:text>
    </xsl:when>
    <xsl:when test="/searchresponse/profile = 'fyr'">
      <xsl:text>Safety Harbor Public Library</xsl:text>
    </xsl:when>
    <xsl:when test="/searchresponse/profile = 'fyq'">
      <xsl:text>Steelman Media Center at Southeastern University</xsl:text>
    </xsl:when>
    <xsl:when test="/searchresponse/profile = 'fyqr'">
      <xsl:text>Steelman Media Center at Southeastern University (RESERVES)</xsl:text>
    </xsl:when>
    <xsl:when test="/searchresponse/profile = 'ftp'">
      <xsl:text>Tarpon Springs Public Library</xsl:text>
    </xsl:when>
    <xsl:otherwise>
      <xsl:choose>
        <xsl:when test="boolean(normalize-space($source_id))">
          <xsl:for-each select="/searchresponse/group/pools/datapool">
            <xsl:if test="$source_id = source/id">
              <xsl:value-of select="source/sourcelabel"/>
            </xsl:if>
          </xsl:for-each>
        </xsl:when>
        <xsl:otherwise>
          <xsl:value-of select="/searchresponse/group/pools/datapool/source/sourcelabel"/>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>

No, it’s not elegant, but it seems to work…

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: