Class AtomicMappingExpression

    • Constructor Detail

      • AtomicMappingExpression

        public AtomicMappingExpression​(Expression start,
                                       Expression step)
        Constructor
        Parameters:
        start - A node-set expression denoting the absolute or relative set of nodes from which the navigation path should start.
        step - The step to be followed from each node in the start expression to yield a new node-set
    • Method Detail

      • isHybrid

        public boolean isHybrid()
        Determine whether this expression is capable (as far as static analysis is concerned) of returning a mixture of nodes and atomic values. If so, this needs to be prevented at run time
        Overrides:
        isHybrid in class SlashExpression
        Returns:
        true if the static type allows both nodes and atomic values
      • typeCheck

        public Expression typeCheck​(ExpressionVisitor visitor,
                                    ItemType contextItemType)
        Type-check the expression
        Overrides:
        typeCheck in class SlashExpression
        Parameters:
        visitor - an expression visitor
        contextItemType - the static type of "." at the point where this expression is invoked. The parameter is set to null if it is known statically that the context item will be undefined. If the type of the context item is not known statically, the argument is set to Type.ITEM_TYPE
        Returns:
        the original expression, rewritten to perform necessary run-time type checks, and to perform other type-related optimizations
      • copy

        public Expression copy()
        Copy an expression. This makes a deep copy.
        Overrides:
        copy in class SlashExpression
        Returns:
        the copy of the original expression
      • explain

        public void explain​(ExpressionPresenter destination)
        Diagnostic print of expression structure. The abstract expression tree is written to the supplied output destination.
        Overrides:
        explain in class SlashExpression
        Parameters:
        destination - the expression presenter used to display the structure