Loading TOC...

sem.transitiveClosure

sem.transitiveClosure(
   $seeds as sem.iri[],
   $predicates as sem.iri[],
   $limit as Number
) as Sequence

Summary

From a starting set of seeds, follow a given set of predicates, to a given depth, and return all unique node IRIs.

Parameters
$seeds A set of seed IRIs.
$predicates A set of predicates to follow.
$limit A limit of how many predicates to follow.

Example


var sem = require("/MarkLogic/semantics.xqy");
sem.transitiveClosure(
    sem.iri("http://www.w3.org/People/Berners-Lee/card#i"),
    sem.iri("http://xmlns.com/foaf/0.1/knows"),
    9);
=>
http://www.w3.org/People/Berners-Lee/card#i
    

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy