XSLT and XPath function reference in alphabetical order

(Excerpt from “XSLT 2.0 & XPath 2.0” by Frank Bongers, chapter 5, translated from German)

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z



Information on the runtime environment


XSLT 2.0

Return value:

The function returns the value true or false depending on the availability of the stated schema type.




Obligatory. A xs:string character string in the lexical form of a QName which corresponds in its expanded form to a schema type whose validity shall be tested in the static context. If the string passed on does not correspond to a QName, an error is reported.

Purpose of use:

The type-available() function is able to test the availability of a schema type in the static context of the stylesheet. The schema type is passed on in the form of a QName. For this purpose, the processor must support XML Schema (schema-aware processor). The function also tests the availability of the related constructor function, provided that the tested type is atomic and derived from a primitive type.

However, the function is inappropriate for the test of imported user-defined schema types in connection with the use-when attribute, because schema definitions imported via <xsl:import-schema> are not available at the moment of the evaluation of the static context. For the same reason, the test for availability of a constructor of an imported type with function-available() in use-when would likewise fail.

Remark: The current implementation of the function in Saxon 8.9 tests for availability of the type at runtime, provided that the expression in which the function is called up requires this. The manufacturer declares that this does not expressly allow a conclusion about the availability of the type in the static context.

Function definition:

XSLT 1.0:

The function is not available.

XSLT 2.0:

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


<< back next >>




Copyright © Galileo Press, Bonn 2008
Printing of the online version is permitted exclusively for private use. Otherwise this chapter from the book "XSLT 2.0 & XPath 2.0" is subject to the same provisions as those applicable for the hardcover edition: The work including all its components is protected by copyright. All rights reserved, including reproduction, translation, microfilming as well as storage and processing in electronic systems.

Galileo Press, Rheinwerkallee 4, 53227 Bonn, Germany