Class LocationKind

java.lang.Object
net.sf.saxon.trace.LocationKind

public class LocationKind extends Object
This class holds constants identifying different kinds of location in a source stylesheet or query. These constants are used in the getConstructType() method of class InstructionInfo. They represent points in the evaluation of a stylesheet (or query or XPath expression) that are notified to the trace listener.

Any constant used in StandardNames can be used as a Location. Such names are generally used to identify XSLT instructions. They are also used for equivalent constructs in XQuery, for example XSL_ELEMENT is used for a computed element constructor in XQuery. The constants in StandardNames are all in the range 0-1023, so constants defined in this class are outside this range.

The constants in this file are annotated with Q to indicate they can appear in XQuery trace output, T to indicate they can appear in XSLT trace output.

Since:
9.7: previously named net.sf.saxon.trace.Location. No longer used to identify constructs causing changes on the context stack; the class ContextOriginator is now used for this purpose.
  • Field Details

    • EXTENSION_INSTRUCTION

      public static final int EXTENSION_INSTRUCTION
      An XSLT instruction. The name of the instruction (which may be an extension instruction) can be obtained using the fingerprint property. Usage:T
      See Also:
    • LITERAL_RESULT_ELEMENT

      public static final int LITERAL_RESULT_ELEMENT
      An XSLT literal result element, or an XQuery direct element constructor. Usage:QT
      See Also:
    • LITERAL_RESULT_ATTRIBUTE

      public static final int LITERAL_RESULT_ATTRIBUTE
      An attribute of an XSLT literal result element or of an XQuery direct element constructor. Usage: QT
      See Also:
    • TEMPLATE

      public static final int TEMPLATE
      An XSLT user-written template rule or named template. Usage: T
      See Also:
    • FUNCTION_CALL

      public static final int FUNCTION_CALL
      An XPath function call to a user-defined function. The "expression" property references the actual expression, of class ComputedExpression. The "target" property references the function being called, of class UserFunction. Usage: QTC
      See Also:
    • XPATH_IN_XSLT

      public static final int XPATH_IN_XSLT
      Entry point to a top-level XPath expression within an XSLT stylesheet. Usage: TC
      See Also:
    • FOR_EXPRESSION

      public static final int FOR_EXPRESSION
      An XPath or XQuery "for" clause. Usage: Q
      See Also:
    • LET_EXPRESSION

      public static final int LET_EXPRESSION
      An XQuery "let" clause, or an XSLT local variable (which compiles into a LET clause). Usage: Q,T
      See Also:
    • RETURN_EXPRESSION

      public static final int RETURN_EXPRESSION
      An XPath or XQuery "return" clause. Usage: Q
      See Also:
    • IF_EXPRESSION

      public static final int IF_EXPRESSION
      An XPath or XQuery "if" expression. Usage: Q
      See Also:
    • THEN_EXPRESSION

      public static final int THEN_EXPRESSION
      An XPath or XQuery "then" clause. Usage: Q
      See Also:
    • ELSE_EXPRESSION

      public static final int ELSE_EXPRESSION
      An XPath or XQuery "else" clause. Usage: Q
      See Also:
    • WHERE_CLAUSE

      public static final int WHERE_CLAUSE
      A WHERE clause in a FLWOR expression. Usage: Q
      See Also:
    • ORDER_BY_CLAUSE

      public static final int ORDER_BY_CLAUSE
      An order-by clause in a FLWOR expression. Usage: Q
      See Also:
    • TYPESWITCH_EXPRESSION

      public static final int TYPESWITCH_EXPRESSION
      An XPath or XQuery "typeswitch" expression. Usage: Q
      See Also:
    • CASE_EXPRESSION

      public static final int CASE_EXPRESSION
      CASE clause within "typeswitch". Usage: Q
      See Also:
    • DEFAULT_EXPRESSION

      public static final int DEFAULT_EXPRESSION
      DEFAULT clause within "typeswitch". Usage: Q
      See Also:
    • VALIDATE_EXPRESSION

      public static final int VALIDATE_EXPRESSION
      An XPath or XQuery "validate" expression. Usage: Q
      See Also:
    • SWITCH_EXPRESSION

      public static final int SWITCH_EXPRESSION
      An XPath or XQuery "switch" expression. Usage: Q
      See Also:
    • COPY_MODIFY_EXPRESSION

      public static final int COPY_MODIFY_EXPRESSION
      An XQuery Update copy-modify (transform) expression. Usage: Q
      See Also:
    • INSERT_EXPRESSION

      public static final int INSERT_EXPRESSION
      An XQuery Update insert expression. Usage: Q
      See Also:
    • REPLACE_EXPRESSION

      public static final int REPLACE_EXPRESSION
      An XPath or XQuery replace expression. Usage: Q
      See Also:
    • DELETE_EXPRESSION

      public static final int DELETE_EXPRESSION
      An XPath or XQuery delete expression. Usage: Q
      See Also:
    • RENAME_EXPRESSION

      public static final int RENAME_EXPRESSION
      An XPath or XQuery rename expression. Usage: Q
      See Also:
    • TRACE_CALL

      public static final int TRACE_CALL
      An explicit call of the fn:trace() function. Usage: QT
      See Also:
    • SAXON_EVALUATE

      public static final int SAXON_EVALUATE
      An XPath expression constructed dynamically using saxon:evaluate (or saxon:expression). Usage: QTC
      See Also:
    • FUNCTION

      public static final int FUNCTION
      A function declaration in XSLT or XQuery
      See Also:
    • XQUERY_BODY

      public static final int XQUERY_BODY
      The main XQuery body
      See Also:
    • XPATH_EXPRESSION

      public static final int XPATH_EXPRESSION
      XPath expression, otherwise unclassified. The "expression" property references the actual expression, of class ComputedExpression. Used in fallback cases only.
      See Also:
    • UNCLASSIFIED

      public static final int UNCLASSIFIED
      Unclassified location. Used in fallback cases only.
      See Also:
    • CLAUSE_BASE

      public static final int CLAUSE_BASE
      Values of the form CLAUSE_BASE + n represent FLWOR clauses
      See Also: