Arthur, I think you are referring to SPINx.  You can find more on this
at Help >  SPIN > Using JavaScript to define SPIN/SPARQL Functions,
but to summarize, you need to:

1. import TopBraid/TBC/spinx.owl into your SPIN model (or when
creating a new SPIN model check "file may declare JavScript
functions..."

2. Create a SPIN function with the same name as the JavaScript
function

3. Reference your JavaScript file in the spinx:javaScriptFile

(You can alternatively define the JavaScript directly in
spinx:JavaScriptCode)

The Math library from JavaScript is available to do sin(), cos(), max
(), PI, etc.

-- Scott

On Jan 13, 7:44 pm, Arthur Keen <[email protected]> wrote:
> I need to use expressions containing math functions like sqrt, power ,etc., 
> and constants like pi and e in the LET part of my spin rules.  I came across 
> some examples on the web that use a math: namespace, Is there a library that 
> I can access?  I vaguely recollect a discussion in the group a long time back 
> on doing this using javascript?  
> Arthur
-- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Composer Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/topbraid-composer-users?hl=en.


Reply via email to