# type-available

Returns true if a type with the given name is available, false otherwise

type-available($type as xs:string) → xs:boolean

Arguments
| $type | xs:string | The name of the required type, as a lexical QName
Result | xs:boolean

Links to W3C specifications

Namespace: http://www.w3.org/1999/XSL/Transform

Applies to: XSLT 2.0 and later versions

XSLT 2.0 Specification

XSLT 2.1 Specification

Notes on the Saxon implementation

The Saxon implementation has a minor restriction: if the argument is known only at run-time, then the function tests whether the type exists in the run-time configuration, which does not necessarily prove that it was present in the static context.

In Saxon the `type-available()` function can be used to check for the availability of Java classes. For example `type-available('jt:java.util.HashMap')` returns true, where the prefix `jt` is bound to the URI `http://saxon.sf.net/java-type`.

Next