2012-02-06 2 views
3

AllegroGraph 4.4를 사용하고 있습니다. 케네디 패밀리 트리에 관한 샘플 데이터베이스 입력이 있습니다. SPIN의 튜토리얼에서 예제를 복사했습니다. 여기있다 :SPIN 규칙을 정의하는 방법은 무엇입니까?

(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)) 

문제는 내가이 함수를 등록하는 방법을 를 모르는 것입니다. WebView를 시도했지만이 오류가 발생합니다.

Non-symbol element !ex:age in binding list. 

이 오류가 계속 발생하는 이유는 무엇입니까?

어디에서 규칙을 정의해야합니까?

답변

1

코드는 소스 파일의 일부이거나 REPL에서 평가되어야하는 Common Lisp 코드입니다. "비 기호 요소! 예 : 바인딩 목록의 길이"오류는 !ex:age을 처리하는 동안 시스템이 질식하는 것으로 나타납니다. setup from the example 첫 번째 도움을 실행합니까? 첫 번째 줄과 마지막 줄인 (enable-!-reader)(register-namespace "ex" "http://franz.examples#")!ex:age을 올바르게 읽는 데 필요한 것처럼 보입니다.

(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#") 
관련 문제