Loading TOC...


   $triples as sem:triple*,
   [$options as xs:string*],
   [$query as cts:query?]
) as node()*


This function returns database nodes backing given triples. Any given cts:triple may be backed by zero, one, or multiple database nodes.

triples The triples to locate.
options Matching options. Valid options include:
Specify equality matching (following the rules of the $operator argument to cts:triples).
Specify sameTerm matching (following the rules of the $operator argument to cts:triples) (if neither '=' nor 'sameTerm' are specified, this option gets used by default).
Specify to return all triple-backing nodes, no matter where or in what format they occur in MarkLogic 7, only sem:triple elements are recognized as triples). If this option is not specified, only sem:triple elements found in documents that have the root element of sem:triples will be returned.
Specify to examine the graph component in the passed in sem:triples and use it to match.
query A cts:query to limit the scope of nodes returned.


xquery version "1.0-ml"; 
import module namespace sem = "http://marklogic.com/semantics" 
      at "/MarkLogic/semantics.xqy";
(: this program deletes data--use with care :)
sem:database-nodes($triple-list) ! xdmp:node-delete(.)

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.