Class ContextItemStaticInfo

java.lang.Object
net.sf.saxon.expr.parser.ContextItemStaticInfo
Direct Known Subclasses:
ContextItemStaticInfoEE

public class ContextItemStaticInfo extends Object
A data structure that represents the required type of the context item, together with information about whether it is known to be present or absent or whether it is not known statically whether it is present or absent.
  • Field Details

    • sequenceType

      protected final SequenceType sequenceType
    • status

      protected final Optionality status
    • contextSettingExpression

      protected Expression contextSettingExpression
    • parentless

      protected boolean parentless
    • DEFAULT

      public static final ContextItemStaticInfo DEFAULT
      Default information when nothing else is known
    • ABSENT

      public static final ContextItemStaticInfo ABSENT
  • Constructor Details

    • ContextItemStaticInfo

      public ContextItemStaticInfo(ItemType itemType)
    • ContextItemStaticInfo

      public ContextItemStaticInfo(ItemType itemType, Optionality status)
      Create a ContextItemStaticInfo
      Parameters:
      itemType - the item type of the context item. If the context item is absent, set this to ErrorType.getInstance().
      status - indicates whether the context value is required, optional, or disallowed.
    • ContextItemStaticInfo

      public ContextItemStaticInfo(SequenceType sequenceType, Optionality status)
    • ContextItemStaticInfo

      protected ContextItemStaticInfo(SequenceType sequenceType, Optionality status, boolean parentless)
  • Method Details

    • withStatusUnknown

      public ContextItemStaticInfo withStatusUnknown()
    • withContextSetter

      public ContextItemStaticInfo withContextSetter(Expression setter)
    • setContextSettingExpression

      public void setContextSettingExpression(Expression setter)
    • getContextSettingExpression

      public Expression getContextSettingExpression()
    • getItemType

      public ItemType getItemType()
      Get the static type of the context item. If the context item is known to be undefined, the returned value is
      Returns:
      the static context item type
    • getContextItemUType

      public UType getContextItemUType()
      Get the static type of the context item as a UType
      Returns:
      the static context item type
    • getCardinality

      public int getCardinality()
      Get the cardinality of the context value. XPath 4.0 allows the context value to be any sequence
      Returns:
      the cardinality of the context value
    • getOptionality

      public Optionality getOptionality()
    • setContextPostureStriding

      public void setContextPostureStriding()
      Set streaming posture. The Saxon-HE version of this method has no effect.
    • setContextPostureGrounded

      public void setContextPostureGrounded()
      Set streaming posture. The Saxon-HE version of this method has no effect.
    • isStrictStreamabilityRules

      public boolean isStrictStreamabilityRules()
    • setParentless

      public void setParentless(boolean parentless)
    • isParentless

      public boolean isParentless()