Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Example of MarkLogic 7 Semantic triple query, emitting as custom XML
xquery version "1.0-ml";
let $out:=sem:sparql('
WHERE { <> ?p ?o }
for $i in $out
let $p:=map:get($i,"p")
let $o:=map:get($i,"o")
return <node name="{$p}">{$o}</node>
<node name=""></node>
<node name=""></node>
<node name=""></node>
<node name="">Deborah</node>
<node name="">Deborah Harry</node>
<node name="">Harry</node>
<node name="">1945-07-01</node>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment