Package net.sf.saxon.functions

## Class ElementAvailable

- java.lang.Object
- - net.sf.saxon.functions.AbstractFunction
  - - net.sf.saxon.functions.SystemFunction
    - - net.sf.saxon.functions.ElementAvailable

- All Implemented Interfaces:
    `Callable`, `Function`, `GroundedValue`, `Item`, `Sequence`

      public class ElementAvailable
      extends SystemFunction

  This class supports the XSLT element-available function. Note that when running in a 2.0 processor, it only looks for XSLT 2.0 instructions; but when running in a 3.0 processor, it recognizes all elements in the XSLT namespace whether or not they are classified as instructions.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ElementAvailable()` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `BooleanValue` | `call​(XPathContext context, Sequence[] arguments)` | Evaluate the expression
    `int` | `getSpecialProperties​(Expression[] arguments)` | Special-case for element-available('xsl:evaluate') which may be dynamically-disabled, and the spec says that this should be assessed at run-time.
    `static boolean` | `isXslt30Element​(int fp)` |

    - ### Methods inherited from class net.sf.saxon.functions.SystemFunction

      `dependsOnContextItem, dynamicCall, equals, export, exportAdditionalArguments, exportAttributes, fixArguments, getArity, getCardinality, getCompilerName, getContextNode, getDescription, getDetails, getErrorCodeForTypeErrors, getFunctionItemType, getFunctionName, getIntegerBounds, getNetCost, getOperandRoles, getRequiredType, getResultItemType, getResultItemType, getRetainedStaticContext, getStaticBaseUriString, getStreamerName, importAttributes, isTrustedResultType, makeCall, makeFunction, makeFunctionCall, makeOptimizedFunctionCall, resultIfEmpty, setArity, setDetails, setRetainedStaticContext, supplyTypeInformation, toShortString, toString, typeCheckCaller`

    - ### Methods inherited from class net.sf.saxon.functions.AbstractFunction

      `atomize, deepEquals, effectiveBooleanValue, getAnnotations, getStringValue, getStringValueCS, isArray, isMap, makeNewContext, simplify, typeCheck`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface net.sf.saxon.om.Function

      `getGenre`

    - ### Methods inherited from interface net.sf.saxon.om.GroundedValue

      `asIterable, concatenate, containsNode, materialize`

    - ### Methods inherited from interface net.sf.saxon.om.Item

      `getLength, head, isStreamed, itemAt, iterate, reduce, subsequence`

    - ### Methods inherited from interface net.sf.saxon.om.Sequence

      `makeRepeatable`

- - ### Constructor Detail

    - #### ElementAvailable

          public ElementAvailable()

  - ### Method Detail

    - #### isXslt30Element

          public static boolean isXslt30Element​(int fp)

    - #### getSpecialProperties

          public int getSpecialProperties​(Expression[] arguments)

      Special-case for element-available('xsl:evaluate') which may be dynamically-disabled, and the spec says that this should be assessed at run-time. By indicating that the effect of the function depends on the run-time environment, early evaluation at compile time is suppressed.
      Overrides:
        `getSpecialProperties` in class `SystemFunction`
      Parameters:
        `arguments` - the actual arguments supplied in a call to the function

    - #### call

          public BooleanValue call​(XPathContext context,
                                   Sequence[] arguments)
                            throws XPathException

      Evaluate the expression
      Parameters:
        `context` - the dynamic evaluation context
        `arguments` - the values of the arguments, supplied as SequenceIterators
      Returns:
        the result of the evaluation, in the form of a SequenceIterator
      Throws:
        `XPathException` - if a dynamic error occurs during the evaluation of the expression