Loading TOC...

MarkLogic Server 11.0 Product Documentation
exsl:object-type

exsl:object-type(
   $value as item()*
) as xs:string

Summary

Returns a string that contains the type-name of the object passed as the argument.

Parameters
value The given object $value whose type needs to be found.

Usage Notes

This function is based on the EXSLT functions (http://www.exslt.org/).

Example

xquery version "1.0-ml";

xdmp:xslt-eval(
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                   xmlns:exsl="http://exslt.org/common"
                   extension-element-prefixes="exsl"
                   version="2.0">
     <xsl:variable name="string" select="'fred'" />
     <xsl:variable name="number" select="93.7" />
     <xsl:variable name="boolean" select="true()" />
     <xsl:variable name="node-set" select="//element()" />
     <xsl:template match="/">
        ;
        <xsl:value-of select="exsl:object-type($string)" />;
        <xsl:value-of select="exsl:object-type($number)" />;  
        <xsl:value-of select="exsl:object-type($boolean)" />;  
        <xsl:value-of select="exsl:object-type($node-set)" />
     </xsl:template>
   </xsl:stylesheet>
,
document{<doc/>})
 
=>
     ;
     string;
     number;  
     boolean;  
     node-set
 

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