java.lang.Object
dev.metaschema.core.metapath.function.library.FnLast

public final class FnLast extends Object
Implements fn:last.

Returns the context size from the dynamic context. This is the number of items in the sequence being processed, and is used with predicates to test if an item is the last in the sequence.

  • Method Details

    • fnLast

      @NonNull public static IIntegerItem fnLast(@NonNull DynamicContext dynamicContext)
      Returns the context size from the dynamic context.

      Based on the XPath 3.1 fn:last function.

      Parameters:
      dynamicContext - the dynamic evaluation context
      Returns:
      the context size as an integer
      Throws:
      ContextAbsentDynamicMetapathException - if the focus context is absent (XPDY0002)