Loading TOC...

MarkLogic 10 Product Documentation
fn.typeAvailable

fn.typeAvailable(
   type-name as String
) as Boolean

Summary

Returns true if and only if there is a type whose name matches the value of the $type-name argument is present in the static context. This is an XSLT function, and it is available in both XSLT and in XQuery 1.0-ml.

Parameters
type-name The $type-name is a string containing a lexical QName. It may be a name of a builtin-type, type imported using xsl:import-schema, or an extension type. This parameter is mandatory. The lexical QName is expanded using the namespace declarations in scope for the expression. If the lexical QName is unprefixed, then the default namespace is used in the expanded QName.

Example

fn.typeAvailable("xs:integer")
=> true

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