Loading TOC...


   $dataset as sem:triple*
) as sem:store


Returns a sem:store constructor that queries from the sequence of sem:triple values passed in as an argument. The sem:store constructor returned from this function will raise an error if it is passed as part of the options argument to a call to sem:sparql-update().

The default rulesets configured on the current database have no effect on a sem:store constructor created with sem:in-memory-store().

This should be used along with sem:sparql() in preference to the deprecated sem:sparql-triples() function. We will remove documentation of sem:sparql-triples(), but leave the function for backwards compatibility.

This function is a built-in.

dataset A set of triple values representing the dataset for the store.

The results from a SPARQL construct query or call to sem:rdf-parse() can be used directly as the value for this argument.

Required Privileges



xquery version "1.0-ml";

import module namespace sem = "http://marklogic.com/semantics"
      at "/MarkLogic/semantics.xqy";

let $turtle-document := '
    @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
    @prefix dc: <http://purl.org/dc/elements/1.1/> .
    @prefix ex: <http://example.org/people/1.0/> .
    dc:title "RDF/XML Syntax Specification (Revised)" ;
    ex:editor [
      ex:fullname "Dave Beckett";
      ex:homePage <http://purl.org/net/dajobe/>
    ] .'
let $triples := sem:rdf-parse($turtle-document, ("turtle", "repair") )
sem:store() :  Use the value to pass into a function that
requires a sem:store (like sem:sparql-update).

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