Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

XSLT element-available() Function

XSLT element-available() Function


XSLT Function Reference Object Complete XSLT function reference


Definition and Usage

The element-available() function returns a Boolean value indicating whether the XSLT processor supports the specified element.

This function can only be used to test elements located in the template body. These elements are:


Syntax

boolean element-available(string)

Parameters

Parameters Description
string Required. Specifies the element to test.

Example 1

xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

xsl:choose

xsl:comment is supported.

xsl:otherwise

xsl:comment is not supported.

xsl:choose

xsl:delete is supported.

xsl:otherwise

xsl:delete is not supported.

View the XSL file、 View the result。


XSLT Function Reference Object Complete XSLT function reference