Class 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 Detail

      • ElementAvailable

        public ElementAvailable()
    • Method Detail

      • isXslt30Element

        public static boolean isXslt30Element​(int fp)
      • isXslt40Element

        public static boolean isXslt40Element​(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
        Returns:
        the properties
      • 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