fn:element-available

Determines whether a particular instruction (typically, an extension element) is available for use in a stylesheet.

element-available($arg as xs:string) ➔ xs:boolean

Arguments

 

$arg

xs:string

The name of the extension element (a lexical QName)

Result

xs:boolean

Namespace

http://www.w3.org/2005/xpath-functions

Links to W3C specifications

XSLT 3.0 Specification

Saxon availability

Available in XSLT 2.0 and later versions. Available in all Saxon editions.

Notes on the Saxon implementation

The effect of the function changed in XSLT 3.0 to return true for all defined elements in the XSLT namespace, not only those classified as instructions. Saxon implements the 3.0 specification.

If experimental XSLT 4.0 extensions are enabled, then element-available() returns true for the newly defined elements (such as xsl:item-type and xsl:array).

For xsl:evaluate, element-available() returns true unless the configuration option DISABLE_XSL_EVALUATE is set.

For xsl:import-schema, element-available() returns true if executed under a configuration that supports schema processing (that is, Saxon-EE with a suitable license file), provided that the execution target (for exported SEF files) is also "EE".

For a SaxonJS stylesheet using elements in the ixsl namespace (such as ixsl:schedule-action), element-available() returns true with SaxonJ and SaxonCS only if the execution target (for exported SEF files) is "JS".