com.marklogic.xcc.exceptions

## Class QueryStackFrame

- java.lang.Object
- - com.marklogic.xcc.exceptions.QueryStackFrame

- Direct Known Subclasses:
    XQueryStackFrame

      public class QueryStackFrame
      extends java.lang.Object

  A query stack frame.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `QueryStackFrame(java.lang.String uri, int line, java.lang.String operation, XdmVariable[] variables, java.lang.String contextItem, int contextPosition, java.lang.String xqueryVersion)` Construct a stack frame.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getContextItem()` Get the context item, or null if there is no context defined.
    `int` | `getContextPosition()` Get the context position, or 0 if there is no context defined.
    `int` | `getLineNumber()` Get the line number in the XQuery source.
    `java.lang.String` | `getOperation()` Get the description of the current operation.
    `java.lang.String` | `getUri()` Get the URI of the XQuery source.
    `XdmVariable[]` | `getVariables()` Get the variable bindings.
    `java.lang.String` | `getXQueryVersion()` Get the XQuery version for this stack frame

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

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

- - ### Constructor Detail

    - #### QueryStackFrame

          public QueryStackFrame(java.lang.String uri,
                                 int line,
                                 java.lang.String operation,
                                 XdmVariable[] variables,
                                 java.lang.String contextItem,
                                 int contextPosition,
                                 java.lang.String xqueryVersion)

      Construct a stack frame.
      Parameters:
        `uri` - The URI of the XQuery source.
        `line` - The line number in the XQuery source.
        `operation` - The description of the current operation.
        `variables` - The variable bindings.
        `contextItem` - The context item or null.
        `contextPosition` - The context position or 0.
        `xqueryVersion` - The XQuery version of the module

  - ### Method Detail

    - #### getUri

          public java.lang.String getUri()

      Get the URI of the XQuery source.
      Returns:
        The URI of the module, if defined.

    - #### getLineNumber

          public int getLineNumber()

      Get the line number in the XQuery source.
      Returns:
        The line number for this string

    - #### getOperation

          public java.lang.String getOperation()

      Get the description of the current operation.
      Returns:
        A description of the operation

    - #### getVariables

          public XdmVariable[] getVariables()

      Get the variable bindings.
      Returns:
        The variable bindings

    - #### getContextItem

          public java.lang.String getContextItem()

      Get the context item, or null if there is no context defined.
      Returns:
        The context item or null

    - #### getContextPosition

          public int getContextPosition()

      Get the context position, or 0 if there is no context defined.
      Returns:
        The context position, or 0

    - #### getXQueryVersion

          public java.lang.String getXQueryVersion()

      Get the XQuery version for this stack frame
      Returns:
        The XQuery version of the module

Copyright © 2025 MarkLogic Corporation. All Rights Reserved.

Complete online documentation for MarkLogic Server, XQuery and related components may be found at developer.marklogic.com