Loading TOC...

MarkLogic 10 Product Documentation
sem:triple-graph

sem:triple-graph(
   $triple as sem:triple
) as sem:iri?

Summary

Returns the graph identifier (graph IRI) from a sem:triple value.

This function is a built-in.

Parameters
triple The triple.

Example

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

let $triple := sem:triple(sem:iri("subject"), sem:iri("predicate"), "object")

return
    sem:triple-graph($triple)

=>
empty (because there is no graph URI)

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