Dear all,

I am using DSPACE 5.5 with Mirage theme. I want to add a javascript 
function that calculates the SHA1. I have inserted in item-view.xsl the 
following:

...
    xmlns:tib="tib"
    extension-element-prefixes="tib"
...

    <xalan:component prefix="tib" functions="SHA1">
      <xalan:script lang="javascript">
        <![CDATA[
             function SHA1(msg) {  ... }
        ]]>
      </xalan:script>
    </xalan:component>  

and the call:
    <xsl:template name="TIB-Link-test">
                 <a>
                   <xsl:attribute 
name="href">https://www.tib.eu/en/search/id/eg%3Asha_doi~<xsl:value-of 
select="tib:SHA1($identifier_doi)"/>/</xsl:attribute>
                   <img height="64"  
src="{concat($theme-path,'/images/tib.png')}" title="Buy-Link"/>
                </a>
    </xsl:template>  

But it doesn't work. I am getting an java.lang.NullPointerException: 
*Unknown error in XPath.* 
context:/file:///var/lib/tomcat8/webapps/ROOT/themes/Mirage_EG/lib/xsl/core/page-structure.xsl
 
- 317:100 

*Failed to process pipeline* 
context:/file:///var/lib/tomcat8/webapps/ROOT/themes/Mirage_EG/lib/xsl/core/page-structure.xsl
 
- 317:100 *[TransformerException]* 
context:/file:///var/lib/tomcat8/webapps/ROOT/aspects/aspects.xmap - 96:31 
*<map:serialize 
type="xml">* 
context:/file:///var/lib/tomcat8/webapps/ROOT/aspects/aspects.xmap - 95:55 
*<map:generate 
type="file">* 
context:/resource://aspects/ViewArtifacts/sitemap.xmap - 109:60 *<map:serialize 
type="xml">* 
context:/resource://aspects/ViewArtifacts/sitemap.xmap - 106:121 
*<map:transform 
type="Include">* 
context:/resource://aspects/ViewArtifacts/sitemap.xmap - 99:116 *<map:transform 
type="Include">* 
context:/resource://aspects/ViewArtifacts/sitemap.xmap - 91:59 *<map:transform 
type="Navigation">* 
context:/resource://aspects/ViewArtifacts/sitemap.xmap - 79:40 
*<map:generate>* 
context:/resource://aspects/BrowseArtifacts/sitemap.xmap - 53:44 
*<map:serialize 
type="xml">* 
context:/resource://aspects/BrowseArtifacts/sitemap.xmap - 50:56 
*<map:transform 
type="CommunityBrowser">* 
context:/resource://aspects/BrowseArtifacts/sitemap.xmap - 47:47 
*<map:transform 
type="Navigation">* 
context:/resource://aspects/BrowseArtifacts/sitemap.xmap - 41:28 
*<map:generate>*   ...

I have nothing changed in page-structure.xsl. What am I doing wrong?

Any help is appreciated.

Stefanie

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Reply via email to