com.saxonica.stream.watch

## Class GroupedItemStoppingFeed

- java.lang.Object
- - com.saxonica.stream.feed.ItemFeed
  - - com.saxonica.stream.watch.GroupedItemStoppingFeed

- All Implemented Interfaces:
    Feed

      public class GroupedItemStoppingFeed
      extends ItemFeed

  This feed supports xsl:for-each-group in streaming mode. The essence of this class is that its open() and close() methods do nothing. These methods are called automatically before and after processing each item in the group, and by doing nothing, they ensure that the pre-group and post-group processing does not happen before and after processing each item in the group. Instead, the GroupingFeed triggers the pre-group and post-group processing directly.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `GroupedItemStoppingFeed(Expression expression, Feed result, Stack<XPathContext> contextStack)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `append(Item item)` Supply one item towards the streamed input of the expression (that is, one item of the grouping population)
    `void` | `close()` Finish evaluating the expression.
    `void` | `open()` Called at the start of processing each item selected by the for-each-group instruction

    - ### Methods inherited from class com.saxonica.stream.feed.ItemFeed

      `getContext, getContextStack, getExpression, getPipelineConfiguration, getResult, setPipelineConfiguration`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GroupedItemStoppingFeed

          public GroupedItemStoppingFeed(Expression expression,
                                 Feed result,
                                 Stack<XPathContext> contextStack)

  - ### Method Detail

    - #### open

          public void open()
                    throws XPathException

      Called at the start of processing each item selected by the for-each-group instruction
      Specified by:
        `open` in interface `Feed`
      Overrides:
        `open` in class `ItemFeed`
      Throws:
        `XPathException`

    - #### append

          public void append(Item item)
                      throws XPathException

      Supply one item towards the streamed input of the expression (that is, one item of the grouping population)
      Specified by:
        `append` in interface `Feed`
      Specified by:
        `append` in class `ItemFeed`
      Parameters:
        `item` - the next item from the population
      Throws:
        `XPathException` - to report any failure

    - #### close

          public void close()
                     throws XPathException

      Description copied from class: `ItemFeed`
      Finish evaluating the expression. The default implementation does nothing.
      Specified by:
        `close` in interface `Feed`
      Overrides:
        `close` in class `ItemFeed`
      Throws:
        `XPathException` - if a dynamic error occurs

Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.