Xquery updating function

Many terms now have explicitly defined, and summarized in a new Glossary section.For example, section 2.5 now defines the terms "static error", "dynamic error", "type error", and "error value".

I'm not sure why the committee didn't go this route. Perhaps they felt it was more consistent to have a "complete" set of computed constructors.

The system performs automatic merges, unless this feature has been disabled by an administrator.

The sem:graph-delete function will only delete triples inserted by the Graph Store API, which have a document root element of sem:triple.

The example uses sem:rdf-builder to construct a triple that matches the one we want to change.

Using this triple with xquery version "1.0-ml"; import module namespace sem = " at "/Mark Logic/semantics.xqy"; (: construct the triple to match against :) let $builder := sem:rdf-builder( sem:prefixes("dbpedia: let $triple := $builder( "dbpedia: John_Doe", "a", "foaf: Person") (: find matching unmanaged triples in the database :) let $node := sem:database-nodes($triple) (: construct the replacement triple with a new subject :) let $replace := declare Update(); const sem = require('/Mark Logic/semantics'); // construct the triple to find in the database const builder = Builder(sem.prefixes('dbpedia: const triple = xdmp.apply(builder, 'dbpedia: John_Doe', 'a', 'foaf: Person'); for (let node of sem.database Nodes(triple)) When you have multiple triples to update, you can use XQuery or Server-Side Java Script (or if they are managed triples, SPARQL Update), to find matching triples, and then iterate over the nodes to replace them.

Leave a Reply