Interface IContextAccessorFunction

All Known Implementing Classes:
AccumulatorFn, AccumulatorFn.AccumulatorAfter, AccumulatorFn.AccumulatorBefore, ContextAccessorFunction, ContextDependentUserFunction, ContextItemAccessorFunction, ContextItemAccessorFunction.Number_0, ContextItemAccessorFunction.StringAccessor, CurrentGroup, CurrentGroupingKey, CurrentOutputUri, FunctionLookup, Idref, Lang, PathFn, PositionAndLast, PositionAndLast.Last, PositionAndLast.Position, RegexGroup, SuperId, SuperId.ElementWithId, SuperId.Id, UnparsedEntity, UnparsedEntity.UnparsedEntityPublicId, UnparsedEntity.UnparsedEntityUri

public interface IContextAccessorFunction
A ContextAccessorFunction is a function that is (or may be) dependent on the dynamic context. In the case of dynamic function calls, the context is bound at the point where the function is created, not at the point where the function is called.
  • Method Summary

    Modifier and Type
    Method
    Description
    Bind context information to appear as part of the function's closure.
    boolean
    Ask whether this function is actually dependent on the dynamic context
  • Method Details

    • dependsOnContext

      boolean dependsOnContext()
      Ask whether this function is actually dependent on the dynamic context
      Returns:
      true if the function cannot be used unless the dynamic context is first bound
    • bindContext

      FunctionItem bindContext(XPathContext context) throws XPathException
      Bind context information to appear as part of the function's closure. If this method has been called, the supplied context will be used in preference to the context at the point where the function is actually called.
      Parameters:
      context - the context to which the function applies. Must not be null.
      Throws:
      XPathException