# in addition, you might want to proxy access to RefWorks - for example:
# ctx.refworks.url = 'http://librweb.laurentian.ca/login?url=http://refworks.scholarsportal.info';
+##############################################################################
+# OpenURL resolution
+##############################################################################
+# Evergreen provides the ability to point at an OpenURL resolver to find
+# electronic resources for a given ISSN or ISBN. Currently, only the SFX
+# resolver is supported.
+##############################################################################
+
+openurl.enabled = 'false';
+openurl.baseurl = 'http://sfx.example.com/instance';
+
%]
args.holdings = [];
args.uris = [];
+ args.issns = [];
+
+ # we use $9 of ISBN and ISSN as a flag for e-version
+ sfx_isbn = xml.findnodes('//*[@tag="020"]/*[@code="9"]');
+ IF sfx_isbn;
+ IF sfx_isbn.textContent == "SFX";
+ my_parent = sfx_isbn.parentNode();
+ sfx_isbn = my_parent.findnodes('./*[@code="a"]');
+ sfx_isbn.replace('-', '');
+ args.resolver_isbn = sfx_isbn.replace('\ .*', '');
+ END;
+ END;
+
+ sfx_issn = xml.findnodes('//*[@tag="022"]/*[@code="9"]');
+ IF sfx_issn;
+ IF sfx_issn.textContent == "SFX";
+ my_parent = sfx_issn.parentNode();
+ sfx_issn = my_parent.findnodes('./*[@code="a"]');
+ args.issns.push(
+ sfx_issn.textContent.replace('[^\d\-X]', '')
+ );
+ END;
+ END;
+
+ # we snag all issns if no SFX available
+ IF args.issns.size == 0;
+ FOR rawissn IN xml.findnodes('//*[@tag="022"]/*[@code="a"]');
+ args.issns.push(
+ rawissn.textContent.replace('[^\d\-X]', '')
+ );
+ END;
+ END;
# URI info is in volumes/volume/uris/volume, instead of uri element
FOR volume IN xml.findnodes('//*[local-name()="volumes"]/*[local-name()="volume"]');
-[% ctx.page_title = attrs.title | html_entity %]
+[% PROCESS "default/opac/parts/misc_util.tt2";
+ USE ResolverResolver;
+ ctx.page_title = attrs.title | html_entity
+%]
<!-- ****************** rdetail_summary.xml ***************************** -->
<abbr class="unapi-id" title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% ctx.bre_id %]'></abbr>
</td>
<td valign="top" id='rdetail_physical_desc'>[% attrs.phys_desc %]</td>
</tr>
+ [% IF openurl.enabled == 'true'; FOR issn IN args.issns %]
+ [% sfx = ResolverResolver.resolve_issn(issn, openurl.baseurl)%]
+ [% FOR res IN sfx %]
+ <tr name="results_issn_tr">
+ <td valign="top">
+ <strong><a href="[% res.target_url %]">
+ [% res.public_name %]</a></strong>
+ </td>
+ <td>[% res.target_coverage %]</td>
+ </tr>
+ [% END %]
+ [% END %]
<tr>
<td nowrap='nowrap' valign="top">
<strong id="rdetail_ed_lbl">[% IF attrs.edition; l("Edition"); END %]</strong>
[% PROCESS "default/opac/parts/misc_util.tt2";
+ IF openurl.enabled == 'true';
+ USE ResolverResolver;
+ END;
+
ctx.result_start = 1 + ctx.page_size * page;
ctx.result_stop = ctx.page_size * (page + 1);
IF ctx.result_stop > ctx.hit_count; ctx.result_stop = ctx.hit_count; END;
</td>
<td>[% attrs.isbn %]</td>
</tr>
+ [% IF openurl.enabled == 'true'; FOR issn IN args.issns %]
+ [% sfx = ResolverResolver.resolve_issn(issn, openurl.baseurl)%]
+ [% FOR res IN sfx %]
+ <tr name="results_issn_tr">
+ <td valign="top">
+ <strong><a href="[% res.target_url %]">
+ [% res.public_name %]</a></strong>
+ </td>
+ <td>[% res.target_coverage %]</td>
+ </tr>
+ [% END %]
+ [% END %]
+
<tr name="results_edition_tr" class="[% attrs.edition ? '' : 'hide_me' %]">
<td valign="top">
<strong>[% l('Edition:') %]</strong>