exsl:object-type( $value as item()* ) as xs:string
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.
|
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