[Koha] Turning a MARC field into a URL

King, Fred Fred.King at Medstar.net
Fri Mar 18 01:43:18 NZDT 2016


Hi Bob, et al.,

It sounds odd, but I really did mean 858. A little background information seems in order; my apologies if I explain things that don't need explaining.

We're a teaching and research hospital, and our staff produce a lot of articles, books, book chapters, conference presentations, etc. Most of the articles appear in journals indexed in Medline (the index of medical literature from the US National Library of Medicine). The library has been tracking articles and putting them into a list for years, but not very efficiently. After we switched to Koha in 2013, I set up a second instance of Koha on our server and adapted it for a local authors catalog. Those of you who made it to the penultimate presentation at Kohacon 2013 in Reno saw me talking about it, if you were still awake by then.

Since then, our local authors catalog has grown, and I realized that I needed to revise the underlying structure to accommodate not only journal articles, but also all the other publications and presentations our staff produce. Rather than modifying existing MARC fields, I decided to create new ones for special purposes--for example, our catalog distinguishes between local authors (Standard MARC 100) and the full author list (Added MARC 190). One of the things I love about Koha is that it's so easy to modify.

And that's what brings me to the 858 field. A journal article can have up to three fields I want to link:
   1. DOI (Digital Object Identifier, a URL that will point to the article even if the publisher changes the location on the server)
   B. Our local link. We don't get all our journals from the publishers; some we get in bundles. If our users try to get an article from thelancet.com, they'll be asked for a password. Our link goes to clinicalkey.com.
   iii. The author's ORCID link. It's kind of like a DOI for people. From the ORCID web site: "ORCID provides a persistent digital identifier that distinguishes you from every other researcher and, through integration in key research workflows such as manuscript and grant submission, supports automated linkages between you and your professional activities ensuring that your work is recognized." It's a good way to distinguish hematologist the William Rubin who lives in Seattle from the haematologist William Rubin who lives in Glasgow.

I'm using the 856u field for the local link. I created field 857u for the DOI, and fields 858a and 858b for the ORCID. Medline's ORCID fields look like this:
   AUID- ORCID: King, Fred http://orcid.org/0000-0001-5266-0279
and I'm putting the name into subfield a and URL into subfield b.

The problem is that I can't get field 858b to be a clickable link. I've checked the "is a URL" box in the subfield advanced constraints, but it remains stubbornly unclickable when I use the xsl coding below. (BTW, I refer below to the detail xsl file. That's wrong--I meant the results xsl file.)

I did get a clickable field when I copied and modified the 856 coding, but I couldn't get the text of the field itself to be clickable. The best I could do is something like
   Digital Object Identifier: http://dx.doi.org/10.1097/PAF.0b013e3181d3dbef (click here)
where "Digital Object Identifier:" is written in results.xsl, "http://dx.doi.org/10.1097/PAF.0b013e3181d3dbef" is field 857u, and "(Click here)" is the actual clickable link. It works, but it's not very elegant--I'd rather have the DOI itself be the clickable link.

And that's where I'm stuck. Any suggestions?

Incidentally, although our local authors catalog is currently on the hospital's intranet only, I'm putting it on an outside server as soon as I'm finished so everyone can look at it. I'm also going to write up what I did and put the instructions on the server. For my ruminations on the older version, see http://www.philobiblios.net/koha.

Fred King
Medical Librarian, MedStar Washington Hospital Center
fred.king at medstar.net
202-877-6670
ORCID 0000-0001-5266-0279

Gosh, Mr Science, I don't understand that even worse than before you explained it!
--Bob and Ray, in memory of Bob Eliot, 26 March 1923 -- 2 February 2016

-----Original Message-----
From: Koha [mailto:koha-bounces at lists.katipo.co.nz] On Behalf Of Bob Birchall
Sent: Wednesday, March 16, 2016 8:27 PM
To: koha at lists.katipo.co.nz
Subject: Re: [Koha] Turning a MARC field into a URL

Hi Fred,
You say 858, do you mean 856?  A URL generally goes into 856$u. More 
info here: http://www.loc.gov/marc/bibliographic/concise/bd856.html

I hope this helps,
Bob Birchall
Calyx

On 17/03/16 05:34, King, Fred wrote:
> Hello, all,
>
> I'm using Koha 3.20.05 on Ubuntu 14.04.
>
> I'm trying to add a new MARC field that's a URL. I've created field 858 in the MARC framework, then added subfields a and b. Under Advanced Constraints in subfield b I checked the box "Is a URL." The description says:
>     Subfield, Text, Constraints
>     a, ORCID, Tab:8, Repeatable, Not mandatory
>     b, ORCID link, Tab:8, Repeatable, Not mandatory, is a URL
>
> Under Cataloging preferences, the URLLinkText is blank.
>
> The coding for the field in the detail xsl file is this:
>
>              <xsl:if test="marc:datafield[@tag=858]">
>                    <span class="results_summary authors">
>                          <span class="label">ORCID: </span>
>                          <xsl:for-each select="marc:datafield[@tag=858]">
>                                <xsl:call-template name="subfieldSelect">
>                                      <xsl:with-param name="codes">ab</xsl:with-param>
>                                </xsl:call-template>
>                                <!-- added to put semi-colon and space between entries -->
>                                <xsl:choose>
>                                      <xsl:when test="position()=last()">
>                                            <xsl:text>.</xsl:text>
>                                      </xsl:when>
>                                      <xsl:otherwise>
>                                            <xsl:text>; </xsl:text>
>                                      </xsl:otherwise>
>                                </xsl:choose>
>                          </xsl:for-each>
>                    </span>
>              </xsl:if>
>
>
> The problem is that when I search for a record containing this field, the text for the b subfield appears, but it isn't a URL-I can see it, but I can't click on it. I tried putting the b subfield in "http://a.web.link.us" format; I didn't think it would work, and it doesn't.
>
> Any suggestions as to what I'm doing wrong? I couldn't find an answer in the manual or online.
>
> Fred King
> Medical Librarian, MedStar Washington Hospital Center

_______________________________________________
Koha mailing list  http://koha-community.org
Koha at lists.katipo.co.nz
https://lists.katipo.co.nz/mailman/listinfo/koha


MedStar Health is a not-for-profit, integrated healthcare delivery system, the largest in Maryland and the Washington, D.C., region. Nationally recognized for clinical quality in heart, orthopaedics, cancer and GI. IMPORTANT: This e-mail (including any attachments) may contain information that is private, confidential, or protected by attorney-client or other privilege. If you received this e-mail in error, please delete it from your system without copying it and notify sender by reply e-mail, so that our records can be corrected. Thank you. Help conserve valuable resources - only print this email if necessary.


More information about the Koha mailing list