[OPEN-ILS-GENERAL] URL Display in PAC

Mike Rylander mrylander at gmail.com
Tue Jul 29 10:27:18 EDT 2014


Kathy,

I was referring specifically to Located URIs, but you're absolutely correct
for unadorned 856 tags.  Here's the relevant code in the stored procedure
that pulls out Located URIs:

    uris := oils_xpath('//*[@tag="856" and (@ind1="4" or @ind1="1") and
(@ind2="0" or @ind2="1")]',marcxml);
    uri_href    := (oils_xpath('//*[@code="u"]/text()',uri_xml))[1];
    uri_label   :=
(oils_xpath('//*[@code="y"]/text()|//*[@code="3"]/text()',uri_xml))[1];
    uri_use     :=
(oils_xpath('//*[@code="z"]/text()|//*[@code="2"]/text()|//*[@code="n"]/text()',uri_xml))[1];

Thanks for poking to get clarification!

Related, you can adjust the xpath for unadorned 856 tags to pull just the
first of y, z, or 3 by appending [1] to the end, like this:

    label = node.findnodes('./*[@code="y"][1]');
    notes = node.findnodes('./*[@code="z" or @code="3"][1]');

--Mike




On Tue, Jul 29, 2014 at 9:08 AM, Kathy Lussier <klussier at masslnc.org> wrote:

>  I am able to display four URLs in a record without any problem. Do all
> of your URL's have a first indicator of 1 and a second indicator of either
> 0 or 1? If they do not, then they will not display.
>
> Sorry, that was a typo. The first indicator should be 4, not 1. Mike, you
> mentioned that 1 would work for ind1, but is that true. The code below
> leads me to believe that 4 is the only number that can be entered there.
>
>
> Kathy
>
> Kathy Lussier
> Project Coordinator
> Massachusetts Library Network Cooperative(508) 343-0128klussier at masslnc.org
> Twitter: http://www.twitter.com/kmlussier
>
> On 7/29/2014 9:02 AM, Kathy Lussier wrote:
>
> Hi Don,
>
> Hope I'm not being to pesty with all these questions.
>
> No, not at all. Don't ever worry about being pesty. We've all been through
> those early go-live days and know how many questions they can generate.
>
> In this case, it looks like you aren't working with Located URI's, so the
> relevant code for the display of URL's is in the parts/misc_util.tt2 file.
>
>
>         # Extract the 856 URLs that are not otherwise represented by
> asset.uri's
>         args.online_res = [];
>         FOR node IN xml.findnodes('//*[@tag="856" and @ind1="4" and
> (@ind2="0" or @ind2="1")]');
>             IF node.findnodes('./*[@code="9" or @code="w" or @code="n"]');
> NEXT; END; # asset.uri's
>             label = node.findnodes('./*[@code="y"]');
>             notes = node.findnodes('./*[@code="z" or @code="3"]');
>             FOR href IN node.findnodes('./*[@code="u"]');
>                 NEXT UNLESS href;
>                 # it's possible for multiple $u's to exist within 1 856
> tag.
>                 # in that case, honor the label/notes data for the first
> $u, but
>                 # leave any subsequent $u's as unadorned href's.
>                 # use href/link/note keys to be consistent with args.uri's
>                 args.online_res.push({
>                     href => href.textContent,
>                     link => (loop.first AND label) ? label.textContent :
> href.textContent,
>                     note => (loop.first) ? notes.textContent : ''
>                 });
>             END;
>
> As you can see from the above code, anything in subfield z or subfield 3
> should display as a note. However, I think the problem you've encountered
> is that you are using both a subfield 3 and a subfield z. I tested this
> combination, and the notes do indeed disappear when both subfields are
> used. There may be an easy fix for this (it might be worthwhile to file a
> Launchpad bug), but, in the meantime, you might want to restrict yourself
> to just one of these subfields.
>
> I am able to display four URLs in a record without any problem. Do all of
> your URL's have a first indicator of 1 and a second indicator of either 0
> or 1? If they do not, then they will not display.
>
> I also created copy records for each electronic volume, with a shelving
> location of "E-Resource Freely Available". What would y'all think about
> making the Shelving Location a hot link in the Available Copies display?
>
>
> We actively try not to use copy records to represent our electronic items,
> so this feature would not be useful for us.
>
> I hope this helps!
> Kathy
>
> Kathy Lussier
> Project Coordinator
> Massachusetts Library Network Cooperative(508) 343-0128klussier at masslnc.org
> Twitter: http://www.twitter.com/kmlussier
>
> On 7/29/2014 8:25 AM, Donald Butterworth wrote:
>
>    All,
>
>  Hope I'm not being to pesty with all these questions. Here is an issue
> that I ran into doing some bibliographic clean-up.
>
>  I found a bib record for an old set that has 4 volumes. We were missing
> one of the volumes. The good news is that Internet Archives has a digital
> copy of all 4 volumes, so I added the URL for all 4 volumes, in 4 separate
> 856 tags. $3e-Book$uURL$zVolume 1, 3rd edition, freely available from
> Internet Archives.
>
>  Once the record is saved all that appears in the PAC Under the Electronic
> Resources banner are 3 lonesome URLs.
>
>  First, is there a setting that needs attention so that all 4 URLs
> display? Second, is there a setting that needs attention so that the $z
> Note subfiled displays with the URL?
>
>  I also created copy records for each electronic volume, with a shelving
> location of "
>
>
>
> --
> Don Butterworth
> Faculty Associate / Librarian III
> B.L. Fisher Library
> Asbury Theological Seminary
> don.butterworth at asburyseminary.edu
> (859) 858-2227
>
>
>
>


-- 
Mike Rylander
 | Director of Research and Development
 | Equinox Software, Inc. / Your Library's Guide to Open Source
 | phone:  1-877-OPEN-ILS (673-6457)
 | email:  miker at esilibrary.com
 | web:  http://www.esilibrary.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libmail.georgialibraries.org/pipermail/open-ils-general/attachments/20140729/3bae0716/attachment.htm>


More information about the Open-ils-general mailing list