我正在尝试在 ML 8.0 上运行以下推理示例,但它在抱怨
“[1.0-ml] XDMP-UNDFUN: (err:XPST0017) 未定义函数 sem:sparql-update()”
谁能告诉我为什么会出现这个问题?
http://docs.marklogic.com/guide/semantics/inferencing?print=yes
import module namespace sem = "http://marklogic.com/semantics"
at "/MarkLogic/semantics.xqy";
let $sup :=
'
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
INSERT DATA
{ <someMedicalCondition> rdf:type <osteoarthritis> .
<osteoarthritis> rdfs:subClassOf <bonedisease> . }'
return sem:sparql-update($sup)
; (: transaction separator :)
let $sq :=
'PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX d: <http://diagnoses#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?diagnosis
WHERE { ?diagnosis rdf:type <bonedisease>. } '
let $rs := sem:ruleset-store("rdfs.rules", sem:store())
(: rdfs:rules is a predefined rule set in <MarkLogic-install-dir>/Config :)
return sem:sparql($sq, (), (), $rs)
(: the rules specify that query for <bonedisease> will return the subclass <osteoarthritis> :)