Hey euler, can you guide how to add such functionality in jspui? 

On Wednesday, August 26, 2015 at 9:20:31 PM UTC+5, euler wrote:
>
> 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
>
>
>
> On Thu, Feb 13, 2014 at 9:07 PM, Solomon Kapfunde <skap...@uwc.ac.za 
> <javascript:>> wrote:
>
>> Hi Elvi
>>  
>> This is out of the discussion forum, I have copied the code as you say in 
>> the link but I can't get it to run as it give me errors on all hyerplink 
>> tags in the script as stated in the error below.
>>  
>> 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!
>>  
>> Can you help?
>>  
>> Regards
>> Solomon
>>
>> >>> "Nemiz, Elvi" <esn...@seafdec.org.ph <javascript:>> 2014/02/12 03:48 
>> PM >>>
>> Hello Solomon, 
>>
>> Perhaps this thread might help you. 
>> http://dspace.2283337.n4.nabble.com/Scopus-Integration-Cited-By-Count-API-td4667632.html
>> .
>>
>> Regards,
>> Elvi
>>
>

-- 
All messages to this mailing list should adhere to the DuraSpace Code of 
Conduct: https://duraspace.org/about/policies/code-of-conduct/
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/45e51f33-2137-4c70-84dc-083cf815a504%40googlegroups.com.

Reply via email to