net.sf.saxon.expr

## Interface Callable

- All Known Subinterfaces:
    FunctionItem, MapItem
  All Known Implementing Classes:
    Abs, AbstractFunctionItem, Adjust, Aggregate, AnalyzeStringFn, ArithmeticExpression10, AtomicConstructorFunctionItem, Available, AvailableEnvironmentVariables, Average, BaseURI, BooleanFn, CallableFunctionItem, CallableWithBoundFocus, Ceiling, CodepointEqual, CodepointsToString, CoercedFunction, CollatingFunction, Collection, Compare, CompileTimeFunction, Component, Concat, Contains, CopyOfFn, Count, Current, CurrentDateTime, CurrentGroup, CurrentGroupingKey, CurriedFunction, Data, DateTimeConstructor, DeepEqual, DefaultCollation, DistinctValues, Doc, DocAvailable, DocumentFn, DocumentUriFn, DynamicFunctionCallDefinition.DynamicFunctionCall, ElementAvailable, Empty, EndsWith, EnvironmentVariable, Error, EscapeURI, Evaluate.EvaluateCall, Exists, ExtensionFunctionCall, False, FilterFn, Floor, FoldLeftFn, FoldRightFn, ForEachFn, ForEachPairFn, FormatDate, FormatInteger, FormatNumber, FunctionArity, FunctionAvailable, FunctionLookup, FunctionName, GeneralComparison, GeneralComparison10, GeneralComparison20, GeneralComparisonEE, GeneralFilterFunction.GeneralFilterFunctionCall, GenerateId, HasChildren, HeadFn, HighestOrLowest, Id, Idref, ImmutableMap, IndexOf, Innermost, InScopePrefixes, Insert, IntegratedFunctionCall, JavaExtensionFunctionCall, KeyFn, Lang, Last, LocalNameFn, LowerCase, Matches, Max, Min, Minimax, NameFn, NamespaceForPrefix, NamespaceUriFn, Nilled, NodeNameFn, NormalizeSpace_0, NormalizeSpace_1, NormalizeUnicode, NotFn, NumberFn, Outermost, Parse.ParseCall, ParseJsonFn, ParseXml, ParseXmlFragment, Path, Position, Put, QNameFn, RangeKey, RegexGroup, Remove, Replace, ResolveQName, ResolveURI, Reverse, Root, Round, RoundHalfToEven, Serialize, SerializeJsonFn, SimpleExpression, SingletonMap, SnapshotFn, StartsWith, StaticBaseURI, StringFn, StringJoin, StringLength, StringToCodepoints, Subsequence, Substring, SubstringAfter, SubstringBefore, Sum, SystemFunctionCall, SystemProperty, TailFn, Tokenize, Trace, Translate, TreatFn, True, TypeAvailable, Unordered, UnparsedEntity, UnparsedText, UnparsedTextAvailable, UnparsedTextLines, UpperCase, UriCollection, UserFunctionItem, XPathFunctionCall, XQueryFunctionLibrary.UnresolvedCallable

      public interface Callable

  A generic interface for calling expressions by supplying the values of their subexpressions

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Sequence` | `call(XPathContext context, Sequence[] arguments)` Call the Callable.

- - ### Method Detail

    - #### call

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

      Call the Callable.
      Parameters:
        `context` - the dynamic evaluation context
        `arguments` - the values of the arguments, supplied as Sequences.

        Generally it is advisable, if calling iterate() to process a supplied sequence, to call it only once; if the value is required more than once, it should first be converted to a `GroundedValue` by calling the utility methd SequenceTool.toGroundedValue().

        If the expected value is a single item, the item should be obtained by calling Sequence.head(): it cannot be assumed that the item will be passed as an instance of `Item` or `AtomicValue`.

        It is the caller's responsibility to perform any type conversions required to convert arguments to the type expected by the callee. An exception is where this Callable is explicitly an argument-converting wrapper around the original Callable.

      Returns:
        the result of the evaluation, in the form of a Sequence. It is the responsibility of the callee to ensure that the type of result conforms to the expected result type.
      Throws:
        `XPathException` - if a dynamic error occurs during the evaluation of the expression

Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.