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

public final class FnPosition extends Object
Implements fn:position.

Returns the context position from the dynamic context. The context position is the position of the context item within the sequence of items currently being processed.

  • Method Details

    • fnPosition

      @NonNull public static IIntegerItem fnPosition(@NonNull DynamicContext dynamicContext)
      Returns the context position from the dynamic context.

      Based on the XPath 3.1 fn:position function.

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