Class DeepUpdate

    • Method Detail

      • getRootExpression

        public Expression getRootExpression()
      • getSelectExpression

        public Expression getSelectExpression()
      • getActionExpression

        public Expression getActionExpression()
      • setRootExpression

        public void setRootExpression​(Expression expr)
      • setSelectExpression

        public void setSelectExpression​(Expression expr)
      • setActionExpression

        public void setActionExpression​(Expression expr)
      • operands

        public java.lang.Iterable<Operand> operands()
        Description copied from class: Expression
        Get the immediate sub-expressions of this expression, with information about the relationship of each expression to its parent expression. Default implementation works off the results of iterateSubExpressions()

        If the expression is a Callable, then it is required that the order of the operands returned by this function is the same as the order of arguments supplied to the corresponding call() method.

        Specified by:
        operands in class Instruction
        an iterator containing the sub-expressions of this expression
      • getInstructionNameCode

        public int getInstructionNameCode()
        Get the name of this instruction for diagnostic and tracing purposes
        getInstructionNameCode in class Instruction
        the string "saxon:while"
      • typeCheck

        public Expression typeCheck​(ExpressionVisitor visitor,
                                    ContextItemStaticInfo contextInfo)
                             throws XPathException
        Description copied from class: Expression
        Perform type checking of an expression and its subexpressions. This is the second phase of static optimization.

        This checks statically that the operands of the expression have the correct type; if necessary it generates code to do run-time type checking or type conversion. A static type error is reported only if execution cannot possibly succeed, that is, if a run-time type error is inevitable. The call may return a modified form of the expression.

        This method is called after all references to functions and variables have been resolved to the declaration of the function or variable. However, the types of such functions and variables may not be accurately known if they have not been explicitly declared.

        typeCheck in class Expression
        visitor - an expression visitor
        contextInfo - Information available statically about the context item: whether it is (possibly) absent; its static type; its streaming posture.
        the original expression, rewritten to perform necessary run-time type checks, and to perform other type-related optimizations
        XPathException - if an error is discovered during this phase (typically a type error)
      • copy

        public Expression copy​(RebindingMap rebindings)
        Copy an expression. This makes a deep copy.
        Specified by:
        copy in class Expression
        rebindings - variables that need to be re-bound
        the copy of the original expression
      • getItemType

        public ItemType getItemType()
        Get the item type of the items returned by evaluating this instruction
        getItemType in class Instruction
        the static item type of the instruction
      • processLeavingTail

        public TailCall processLeavingTail​(Outputter output,
                                           XPathContext context)
                                    throws XPathException
        Description copied from class: Instruction
        ProcessLeavingTail: called to do the real work of this instruction. This method must be implemented in each subclass. The results of the instruction are written to the current Receiver, which can be obtained via the Controller.
        Specified by:
        processLeavingTail in interface TailCallReturner
        Specified by:
        processLeavingTail in class Instruction
        output - the destination for the result
        context - The dynamic context of the transformation, giving access to the current node, the current variables, etc.
        null if the instruction has completed execution; or a TailCall indicating a function call or template call that is delegated to the caller, to be made after the stack has been unwound so as to save stack space.
        XPathException - if a dynamic error occurs during the evaluation of the instruction
      • export

        public void export​(ExpressionPresenter out)
                    throws XPathException
        Diagnostic print of expression structure. The abstract expression tree is written to the supplied output destination.
        Specified by:
        export in interface ExportAgent
        Specified by:
        export in class Expression
        out - the expression presenter used to display the structure
        XPathException - if the export fails, for example if an expression is found that won't work in the target environment.