[Isis-users] linking in iaH when data contains "and"

Piet De Keyser piet.dekeyser at ucll.be
Wed Apr 29 10:00:54 CEST 2020


Egbert,

Yes, the can be a solution for existing data.

I think there are two lessons to be learned from this:


  1.  Instruct cataloguers not to use the &-sign in data and to replace it while entering with "and"  in fields that are used to build links in iaH;
  2.  When you are dealing with fields that may contain "and", use the escape code """ in your link

Piet de Keyser
Belgium

Van: Egbert De Smet <egbert.desmet at uantwerpen.be>
Verzonden: woensdag 29 april 2020 9:12
Aan: Piet De Keyser <piet.dekeyser at ucll.be>; isis-users at iccisis.org
Onderwerp: Re: linking in iaH when data contains "and"



maybe you could use a replace() function on your v264 to replace '&' by 'and' ?


Egbert de Smet
Universiteit Antwerpen

________________________________
From: isis-users <isis-users-bounces+egbert.desmet=ua.ac.be at iccisis.org<mailto:isis-users-bounces+egbert.desmet=ua.ac.be at iccisis.org>> on behalf of Piet De Keyser <piet.dekeyser at ucll.be<mailto:piet.dekeyser at ucll.be>>
Sent: Tuesday, April 28, 2020 11:02 PM
To: isis-users at iccisis.org<mailto:isis-users at iccisis.org>
Subject: [Isis-users] linking in iaH when data contains "and"


Dear colleagues,



A link in iaH can be a good idea to allow users to retrieve more of same. I wanted to put a link on the publisher's name (which is in v264^b in my case). Normally my link would look like this:



'<a target="_self"

href="/cgi-bin/wxis.exe/iah/scripts/?IsisScript=iah.xis&lang=en&base=CATALOG&nextAction=lnk&exprSearch=', mpu, v264^b,mpl,'&indexSearch=PU">',v264^b,'</a>',



but this will give you problems with publisher's names in which e.g. the word "and" appears (e.g. Tailor and Francis). These data can only be retrieved successfully if they are put between quotation marks: "Tailor and Francis" (because "and" is a Boolean operator). Now new problem: putting extra quotation marks in the link messes it up, because it already contains nested quotations marks. My sollution is  to put the field between HTML escape codes (in this case "). Now the link becomes:



'<a target="_self"

href="/cgi-bin/wxis.exe/iah/scripts/?IsisScript=iah.xis&lang=en&base=CATALOG&nextAction=lnk&exprSearch=', mpu,"""v264^b""",mpl,'&indexSearch=PU">',v264^b,'</a>',



Still one unsolved problem: the downloaded data is not: "Tailor and Francis", but "Tailor & Francis". My sollution doesn't work with "&" in the data, but maybe not everything is soluble...



Piet de Keyser

Belgium
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.iccisis.org/pipermail/isis-users/attachments/20200429/103ca72c/attachment.html>


More information about the isis-users mailing list