Loading TOC...


   $triples as sem:triple*,
   [$options as xs:string*],
   [$permissions as element],
   [$collections as xs:string*],
   [$quality as xs:int?],
   [$forest-ids as xs:unsignedLong*]
) as xs:string*


This function inserts triples into a specified database as one or more sem:triples documents. It also creates graph metadata for the graph specified by the "graph" or "override-graph=URI" option. This is an update function that returns the document URIs of inserted documents.

$triples The triples to insert.
options Insertion options. Valid options values include:
The graph/context value to give to every quad, whether specified in the data or not.
The database directory path.
$permissions Security permission elements corresponding to the permissions for the document.
collections Additional collections to set on inserted documents. If you use the collections argument when inserting triples, no graph document will be created for these collections.
quality The quality setting for inserted documents.
forest-ids The forest IDs to use for inserted documents.

Usage Notes

Using additional collections with sem:rdf-insert in the context of SPARQL Update can result in undefined behavior.


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

	sem:iri("http://example.com/ns/person#firstName"), "Michael"))

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