Class DraftExpression

java.lang.Object
net.sf.saxon.expr.Expression
net.sf.saxon.expr.DraftExpression
All Implemented Interfaces:
ExportAgent, Locatable, IdentityComparable, Traceable
Direct Known Subclasses:
DraftFunctionCall, DraftFunctionReference

public abstract class DraftExpression extends Expression
A DraftExpression is a temporary expression constructed in the course of parsing, that must be substituted by a real expression before it can be evaluated. It is used, for example, for functions calls whose names cannot yet be resolved to an actual function
  • Constructor Details

    • DraftExpression

      public DraftExpression()
  • Method Details

    • getItemType

      public ItemType getItemType()
      Description copied from class: Expression
      Determine the static item type of the expression, as precisely possible. All expression return sequences, in general; this method determines the type of the items within the sequence, assuming that (a) this is known in advance, and (b) it is the same for all items in the sequence.

      This method should always return a result, though it may be the best approximation that is available at the time.

      Specified by:
      getItemType in class Expression
      Returns:
      a value such as Type.STRING, Type.BOOLEAN, Type.NUMBER, Type.NODE, or Type.ITEM (meaning not known at compile time)
    • getStaticType

      public SequenceType getStaticType()
      Description copied from class: Expression
      Get the static type of the expression as a SequenceType: this is the combination of the item type and the cardinality.
      Overrides:
      getStaticType in class Expression
      Returns:
      the static type of the expression
    • getStaticUType

      public UType getStaticUType(UType contextItemType)
      Description copied from class: Expression
      Get the static type of the expression as a UType, following precisely the type inference rules defined in the XSLT 3.0 specification.
      Overrides:
      getStaticUType in class Expression
      Parameters:
      contextItemType - the static type of the context item
      Returns:
      the static item type of the expression according to the XSLT 3.0 defined rules
    • computeSpecialProperties

      protected int computeSpecialProperties()
      Compute the special properties of this expression. These properties are denoted by a bit-significant integer, possible values are in class StaticProperty. The "special" properties are properties other than cardinality and dependencies, and most of them relate to properties of node sequences, for example whether the nodes are in document order.
      Overrides:
      computeSpecialProperties in class Expression
      Returns:
      the special properties, as a bit-significant integer