Pierluigi; Is the file defined in the same folder as the file with the SPIN function?  It does need to be in the TopBraid workspace, and you can provide a relative or full path name for the js file.  Paths start with "/" in the root folder of the workspace, for example /TopBraid/common/foaf.ttl

-- Scott

On 1/14/2015 12:13 PM, Pierluigi Ritrovato wrote:
I have defined a spin function that make some simple computation through a _javascript_ snippet and works well.
Now I moved the snipped code in a js file and it doesn't work!

this is the spin function

tracking:isSmallDiff  a       spin:Function ;
        rdfs:label            "computes if difference is small"^^xsd:string ;
        rdfs:subClassOf       spin:Functions ;
        spin:constraint       [ a              spl:Argument ;
                                spl:predicate  sp:arg3 ;
                                spl:valueType  xsd:integer
                              ] ;
        spin:constraint       [ a              spl:Argument ;
                                spl:predicate  sp:arg2 ;
                                spl:valueType  xsd:integer
                              ] ;
        spin:constraint       [ a              spl:Argument ;
                                spl:predicate  sp:arg1 ;
                                spl:valueType  xsd:integer
                              ] ;
        spin:returnType       xsd:integer ;
        spinx:_javascript_File  "isSmallDiff.js"^^xsd:string .
 
the js code is:

function isSmallDiff(arg1, arg2, arg3) {
if (Math.abs(arg1-arg2) < arg3) 
return 1; 
else 
return 0;
}

I copied the JS file any pace in my file system!

thank you very much in advance for any help.

Pierluigi

PS curiosity: the _javascript_ code works only if I use arg1, arg2, .... arg5 as argument variables? 

--
You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to [email protected]
---
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to [email protected]
---
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to