3

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?

Stanislav Kralin
  • 11,070
  • 4
  • 35
  • 58
Dragos
  • 2,911
  • 12
  • 39
  • 55

1 Answers1

1

The code is Common Lisp code that should be part of a source file, or evaluated in the REPL. The error you are getting, ”Non-symbol element !ex:age in binding list” seems to indicate that the system is choking while trying to process !ex:age. Does executing the setup from the example first help? The first line and last lines, (enable-!-reader), and (register-namespace "ex" "http://franz.examples#"), seem like what you would need in order to get !ex:age to be read properly.

(enable-!-reader)  
(enable-print-decoded t)  
(create-triple-store "kennedy")  
(load-ntriples "kennedy.ntriples")  
(register-namespace "kennedy" "http://www.franz.com/simple#")  
(register-namespace "ex" "http://franz.examples#")
Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353