Hi Colleagues
I am trying to display scopus citation counts in our repository and found the
following code to begin with: https://gist.github.com/aschweer/6772579
When I add the code in item-view.xml, mirage theme, xmlui i get an error
'javax.xml.transform.TransformerException: a is not allowed in this position in
the stylesheet!'
Here is a snippet of my snippet of the code I am testing with, has anyone ever
deployed it in their server:
<script type="text/javascript"
src="http://api.elsevier.com/javascript/scopussearch.jsp"> </script>
<script type="text/javascript">
<xsl:text>
var strQuery = "DOI(</xsl:text><xsl:value-of
select="dim:field[@element='identifier' and @qualifier='doi']"/><xsl:text
disable-output-escaping="yes">)";
callbackCitedbycount = function(){
if (sciverse.areSearchResultsValid()) {
var resultObj = sciverse.getSearchResults();
if (resultObj.returnedResults >0) {
citedbycount = resultObj.results[0].citedbycount;
eid = resultObj.results[0].eid;
if (citedbycount > 0) {
citeHtml = 'Scopus times cited';
if (eid != null) {
citeHtml += '<a
href="http://www.scopus.com/scopus/search/submit/citedby.url?src=s&origin=recordpage&eid='
(
http://www.scopus.com/scopus/search/submit/citedby.url?src=s&origin=recordpage&eid='
);
citeHtml += eid;
citeHtml += '" class="citing-link" target="_new" title="View
citing articles in Scopus">';
citeHtml += citedbycount;
citeHtml += '</a>';
}
articleLink = resultObj.results[0].inwardurl;
if (articleLink != null) {
citeHtml += ' <small>(<a href="';
citeHtml += articleLink;
citeHtml += '" class="article-link" target="_new" title="View
record in Scopus" >';
citeHtml += 'View record in Scopus';
citeHtml += '</a>)</small>';
}
$("#citecounts-scopus").html(citeHtml);
$("#citecounts-scopus").removeClass('hidden');
$("#citecounts-scopus").show('blind');
$("#citecounts-scopus a.citing-link").click(function(){
if (_gaq != null) {
_gaq.push(['_trackEvent', 'Citecount links', 'Scopus citing
items', 'http://hdl.handle.net/10566/707']);
}
});
$("#citecounts-scopus a.article-link").click(function(){
if (_gaq) {
_gaq.push(['_trackEvent', 'Citecount links', 'Scopus
article', 'http://hdl.handle.net/10566/707']);
}
});
}
}
}
};
runSearch = function() {
//setting defaults
sciverse.setApiKey("[MfNDmWCAIjZPVC2tStf8OOlrAGWO3N]");
sciverse.setCallback(callbackCitedbycount);
//setting search query
// var strQuery = "DOI(10.1002/rra.2609)";
var varSearchObj = new searchObj();
varSearchObj.setSearch(strQuery);
varSearchObj.setNumResults('1');
//launching search
try {
sciverse.runSearch(varSearchObj);
} catch(err) { }
};
runAfterJSImports.add(runSearch);]]>
</xsl:text>
</script>
Regards
Solomon
------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience. Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
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