Class Fork

    • Constructor Detail

      • Fork

        public Fork​(Operand[] prongs)
        Create a Fork instruction
        Parameters:
        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
        Returns:
        an iterator containing the sub-expressions of this expression
      • getInstructionNameCode

        public int getInstructionNameCode()
        Get the namecode of the instruction for use in diagnostics
        Overrides:
        getInstructionNameCode in class Instruction
        Returns:
        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
        Returns:
        the number of xsl:sequence children
      • getProng

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

        public ItemType getItemType()
        Determine the item type of the value returned by the function
        Overrides:
        getItemType in class Instruction
        Returns:
        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
        Overrides:
        getStreamerName in class Expression
        Returns:
        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
        Parameters:
        rebindings - the rebinding map
        Returns:
        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
        Parameters:
        out - the expression presenter used to display the structure
        Throws:
        XPathException - if the export fails, for example if an expression is found that won't work in the target environment.