Loading TOC...


   value as String,
   datatype as sem.iri
) as xs.anyAtomicType


Returns a value to represent the RDF typed literal with lexical value $value and datatype IRI $datatype. Returns a value of type sem:unknown for datatype IRIs for which there is no schema, and a value of type sem:invalid for lexical values which are invalid according to the schema for the given datatype. This XQuery function backs up the SPARQL STRDT() function.

This function is a built-in.

value The lexical value.
datatype The datatype IRI.


var sem = require("/MarkLogic/semantics.xqy");
xdmp.describe(sem.typedLiteral("object", sem.iri("http://www.w3.org/2001/XMLSchema#string"))); 

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