StyleSheetFunctionCall
Date: 2016-07-03

com.icl.saxon.expr

## Class StyleSheetFunctionCall

- java.lang.Object
- - com.icl.saxon.expr.Expression
  - - com.icl.saxon.expr.Function
    - - com.icl.saxon.expr.StyleSheetFunctionCall

-     public class StyleSheetFunctionCall
      extends Function

  This class represents a call to a function defined in the stylesheet

- - ### Field Summary

    - ### Fields inherited from class com.icl.saxon.expr.Function

      `argument`

    - ### Fields inherited from class com.icl.saxon.expr.Expression

      `staticContext`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StyleSheetFunctionCall()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Value` | `evaluate(Context c)` Evaluate the function
    `int` | `getDataType()` Determine the data type of the expression, if possible
    `int` | `getDependencies()` Determine which aspects of the context the expression depends on.
    `java.lang.String` | `getName()` Get the name of the function.
    `Expression` | `reduce(int dependencies, Context context)` Remove dependencies.
    `void` | `setFunction(SAXONFunction f)` Create the reference to the saxon:function element
    `Expression` | `simplify()` Simplify the function call

    - ### Methods inherited from class com.icl.saxon.expr.Function

      `addArgument, checkArgumentCount, display, getNumberOfArguments`

    - ### Methods inherited from class com.icl.saxon.expr.Expression

      `containsReferences, enumerate, evaluateAsBoolean, evaluateAsNodeSet, evaluateAsNumber, evaluateAsString, getStaticContext, indent, isContextDocumentNodeSet, make, outputStringValue, setStaticContext, usesCurrent`

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

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

- - ### Constructor Detail

    - #### StyleSheetFunctionCall

          public StyleSheetFunctionCall()

  - ### Method Detail

    - #### setFunction

          public void setFunction(SAXONFunction f)

      Create the reference to the saxon:function element

    - #### getName

          public java.lang.String getName()

      Get the name of the function.
      Specified by:
        `getName` in class `Function`
      Returns:
        the name of the function, as used in XSL expressions, but excluding its namespace prefix

    - #### getDataType

          public int getDataType()

      Determine the data type of the expression, if possible
      Specified by:
        `getDataType` in class `Expression`
      Returns:
        Value.ANY (meaning not known in advance)

    - #### simplify

          public Expression simplify()
                              throws XPathException

      Simplify the function call
      Overrides:
        `simplify` in class `Expression`
      Returns:
        the simplified expression
      Throws:
        `XPathException`

    - #### getDependencies

          public int getDependencies()

      Determine which aspects of the context the expression depends on. The result is a bitwise-or'ed value composed from constants such as Context.VARIABLES and Context.CURRENT_NODE
      Specified by:
        `getDependencies` in class `Expression`

    - #### reduce

          public Expression reduce(int dependencies,
                          Context context)
                            throws XPathException

      Remove dependencies.
      Specified by:
        `reduce` in class `Expression`
      Parameters:
        `dependencies` - The dependencies to be removed, e.g. Context.VARIABLES
        `context` - The context to be used for the partial evaluation
      Returns:
        a new expression (or Value) that does not have any of the specified dependencies
      Throws:
        `XPathException`

    - #### evaluate

          public Value evaluate(Context c)
                         throws XPathException

      Evaluate the function
      Specified by:
        `evaluate` in class `Expression`
      Parameters:
        `context` - The context in which the function is to be evaluated
      Returns:
        a Value representing the result of the function. This must be of the data type corresponding to the result of getType().
      Throws:
        `XPathException` - if the function cannot be evaluated.