MarkLogic 12 EA 1 Product Documentation
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
Powered by MarkLogic Server | Terms of Use | Privacy Policy