Class ForSequenceMappingAction

  • All Implemented Interfaces:
    MappingFunction

    public abstract class ForSequenceMappingAction
    extends java.lang.Object
    implements MappingFunction
    The ForSequenceMappingAction supports compilation of a ForExpression. It represents the action to be taken for each item in the source sequence. It acts as the MappingFunction for the mapping iterator. The map() method is generated in the subclass, and performs the "action" part of the for expression, being called once per iteration, and returning an iterator over the results.
    • Field Detail

      • position

        protected int position
    • Constructor Detail

      • ForSequenceMappingAction

        public ForSequenceMappingAction()
    • Method Detail

      • setContext

        public void setContext​(XPathContext context)
      • map

        public abstract SequenceIterator map​(Item item)
                                      throws XPathException
        Description copied from interface: MappingFunction
        Map one item to a sequence.
        Specified by:
        map in interface MappingFunction
        Parameters:
        item - The item to be mapped.
        Returns:
        one of the following: (a) a SequenceIterator over the sequence of items that the supplied input item maps to, or (b) null if it maps to an empty sequence.
        Throws:
        XPathException - if a dynamic error occurs