I am using AllegroGraph 4.4. I have their sample database input regarding the Kennedy family tree. I have copied an example from their tutorials on SPIN. Here it is:
(ag.spin:register-spin-function
!ex:age
"prefix kennedy: <http://www.franz.com/simple#>
prefix xs: <http://www.w3.org/2001/XMLSchema#>
select ( (2011 - xs:int(?birthYear)) as ?age ) {
?who kennedy:birth-year ?birthYear .
}"
'(?who))
The problem is that I do not know where and how to register this function. I've tried the WebView, but I get this error:
Non-symbol element !ex:age in binding list.
Why do I keep getting this error?
Where should I define the rule?