Hello,

I'm trying to implement the code Scopus Integration (Cited-By Count API) in my repository: DSPace 1.7.2.

Nemiz, Elvi, kindly, shared it for us here, in dspace-tech, some days ago. Below is the message...

The code works fine but I have a problem. In our repository <http://repositori.uvic.cat/handle/10854/2307?show=full>, all records have de metadata dc.identifier.doi like this example:

http://dx.doi.org/10.1093/bioinformatics/btt249

with***http://**dx.doi.org/ *before the number DOI.

and of course, the code does not work.

I guess you should change something here but I do not know how...

//setting search query
<xsl:text disable-output-escaping="yes">var strQuery = "DOI(</xsl:text><xsl:value-of select="./mets:dmdSec/mets:mdWrap[@OTHERMDTYPE='DIM']/mets:xmlData/dim:dim/dim:field[@element='identifier' and @qualifier='doi']"/><xsl:text disable-output-escaping="yes">)";

Someone can help me?

Thank you in advance.


>>> "Nemiz, Elvi" <esne...@seafdec.org.ph> 2014/02/13 03:59 PM >>>
Hello Solomon,


I'm sorry if I can't pinpoint what's causing that error but here's what I did in our repository. In your item-view.xsl, locate this line of code:

<xsl:template name="itemSummaryView-DIM">
<!-- Generate the info about the item from the metadata section -->
<xsl:apply-templates select="./mets:dmdSec/mets:mdWrap[@OTHERMDTYPE='DIM']/mets:xmlData/dim:dim"
mode="itemSummaryView-DIM"/>

After that piece of code, copy paste these javascript code:

<script type="text/javascript">
<xsl:text disable-output-escaping="yes">
document.write('&lt;script type="text/javascript" src="http://api.elsevier.com/javascript/scopussearch.jsp"&gt; &lt;/' + 'script&gt;');

callbackCitedbycount = function(){
if (sciverse.areSearchResultsValid()) {
var resultObj = sciverse.getSearchResults();
if (resultObj.returnedResults &gt;0) {
citedbycount = resultObj.results[0].citedbycount;
eid = resultObj.results[0].eid;
if (citedbycount &gt; 0) {
citeHtml = '&lt;span class="bold"&gt;Cited:&lt;/span&gt; ';

if (eid != null) {
citeHtml += '&lt;a href="http://www.scopus.com/scopus/search/submit/citedby.url?src=s&amp;origin=recordpage&amp;eid=';
citeHtml += eid;
citeHtml += '" class="citing-link" target="_new" title="View citing articles in Scopus"&gt;';
citeHtml += citedbycount;
citeHtml += '&lt;/a&gt;&#160;times in &lt;span class="bold"&gt;Scopus&lt;/span&gt;';
}

articleLink = resultObj.results[0].inwardurl;

if (articleLink != null) {
citeHtml += '&#160;&#160;&lt;small&gt;(&lt;a href="';
citeHtml += articleLink;
citeHtml += '" class="article-link" target="_new" title="View record in Scopus" &gt;';
citeHtml += 'View record in Scopus';
citeHtml += '&lt;/a&gt;)&lt;/small&gt;';
}
</xsl:text>
var citecountsScopus = $("#citecounts-scopus");
citecountsScopus.html(citeHtml);
citecountsScopus.removeClass('hidden');
citecountsScopus.show('blind');
$("#citecounts-scopus a.citing-link").click(function(){
if (_gaq != null) {
_gaq.push(['_trackEvent', 'Citecount links','Scopus citing items','<xsl:value-of select="./mets:dmdSec/mets:mdWrap[@OTHERMDTYPE='DIM']/mets:xmlData/dim:dim/dim:field[@element='identifier' and @qualifier='uri']"/>']);
}
});
$("#citecounts-scopus a.article-link").click(function(){
if (_gaq) {
_gaq.push(['_trackEvent','Citecount links','Scopus article','<xsl:value-of select="./mets:dmdSec/mets:mdWrap[@OTHERMDTYPE='DIM']/mets:xmlData/dim:dim/dim:field[@element='identifier' and @qualifier='uri']"/>']);
}
});
}
}
}
}

runSearch = function() {
//setting defaults
sciverse.setApiKey("*REPLACE-THIS-WITH-YOUR-SCOPUS-API-KEY*");
sciverse.setCallback(callbackCitedbycount);

//setting search query
<xsl:text disable-output-escaping="yes">var strQuery = "DOI(</xsl:text><xsl:value-of select="./mets:dmdSec/mets:mdWrap[@OTHERMDTYPE='DIM']/mets:xmlData/dim:dim/dim:field[@element='identifier' and @qualifier='doi']"/><xsl:text disable-output-escaping="yes">)";

var varSearchObj = new searchObj();
varSearchObj.setSearch(strQuery);
varSearchObj.setNumResults('1');

//launching search
try {
sciverse.runSearch(varSearchObj);
} catch(err) {}
};
runAfterJSImports.add(runSearch);
</xsl:text>
</script>

And then paste the code in *bold* where you want the scopus citation count to appear. In our case, I put it under the citation field (I assumed that you already knew how to customize what fields to display in simple item view):

<!-- Citation row -->
<xsl:when test="$clause = 9 and (dim:field[@element='identifier' and @qualifier='citation' and descendant::text()])"> *<div id="citecounts-scopus" class="simple-item-view-other citecounts hidden">&#160;</div>*
*
*
*
*
Hoped this helps,

P.S. Please take note that I have created a custom tag, dc.identifier.doi that holds the value for the item's DOI (without the http://dx.doi.org/). Feel free to 'view page source' items in our repository that have DOIs for example: http://repository.seafdec.org.ph/handle/10862/1737 for your reference.

Regards,
Elvi
--

*M. Àngels Pulido Medina*
Biblioteca - Servei de Recursos Informàtics
Logo UVic
*Universitat de Vic*
C. Sagrada Família, 7
08500 Vic
Tel. 938 816 170 (8333)
m.angels.pul...@uvic.cat
*www.uvic.cat <http://www.uvic.cat>*

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to