-1

このクエリを使用してMarklogicにトリプルを挿入しようとしています

 xquery version "1.0-ml";
 import module namespace sem = "http://marklogic.com/semantics"
  at "/MarkLogic/semantics.xqy";

 declare variable $TRIPLE as xs:string external ;
 declare variable $GRAPHNAME as xs:string external ;
 let $TRIPLE:="sem:triple(sem:iri('http://smartlogic.com/document#testForTriples.xml'),sem:iri('http://www.smartlogic.com/schemas/docinfo.rdf#type'),'document')"
 let $GRAPHNAME :="sem:iri('testGraph')"
 let $r :=
 sem:graph-insert($GRAPHNAME,  $TRIPLE)

 return <result>{$r}</result>

残念ながら、それは強制エラーを返します:

XDMP-AS: (err:XPTY0004) $graphname as sem:iri -- Invalid coercion: "sem:iri('testGraph')" as sem:iri

私は何を間違っていますか?

4

1 に答える 1