Class Fork

    • Constructor Detail

      • Fork

        public Fork​(Operand[] prongs)
        Create a Fork instruction
        prongs - the children of the xsl:fork instructions.
    • Method Detail

      • 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.

        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 namecode of the instruction for use in diagnostics
        getInstructionNameCode in class Instruction
        a code identifying the instruction: typically but not always the fingerprint of a name in the XSLT namespace
      • getSize

        public int getSize()
        Get the number of prongs in the fork
        the number of xsl:sequence children
      • getProng

        public Expression getProng​(int i)
        Get the n'th child expression of the xsl:fork (zero-based)
        i - the index of the required subexpression
        the i'th subexpression if it exists
        java.lang.IllegalArgumentException - if i is out of range
      • getItemType

        public ItemType getItemType()
        Determine the item type of the value returned by the function
        getItemType in class Instruction
        the static item type of the instruction
      • getStreamerName

        public java.lang.String getStreamerName()
        Get the (partial) name of a class that supports streaming of this kind of expression
        getStreamerName in class Expression
        the partial name of a class that can be instantiated to provide streaming support in Saxon-EE, or null if there is no such class
      • copy

        public Expression copy​(RebindingMap rebindings)
        Copy an expression. This makes a deep copy.
        Specified by:
        copy in class Expression
        rebindings - the rebinding map
        the copy of the original expression
      • 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.