Loading TOC...

sem:datatype

sem:datatype(
   $value as xs:anyAtomicType
) as sem:iri

Summary

Returns the name of the simple type of the atomic value argument as a SPARQL style IRI. If the value is derived from sem:unknown or sem:invalid, the datatype IRI part of those values is returned. This XQuery function backs up the SPARQL datatype() function.

This function is a built-in.

Parameters
$value The value to return the type of.

Example

sem:datatype("some string")
=>
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.