# Package com.saxonica.stream.watch

This package contains defines the two interfaces Watch and WatchMaker, and various implementations of these interfaces.

See: Description

- Interface Summary
  Interface | Description
  --- | ---
  Watch | A Watch represents a class that is interested in looking at nodes passing down a push pipeline.
  WatchMaker | A WatchMaker is a factory class for creating a `Watch`.

- Class Summary
  Class | Description
  --- | ---
  AccumulatorWatch | This watch implements a single accumulator in streaming mode.
  ApplyImportsWatch | Watch for an xsl:apply-imports instruction.
  ApplyTemplatesWatch | This watch implements xsl:apply-templates in streaming mode.
  ComposingWatch | A ComposingWatch is a Watch that evaluates an expression based on the nodes encountered in a streamed input document, passing the value of that expression as a sequence of items to an ItemFeed.
  CopyOfWatch | This class is used when optimizing a SequentialCopy, that is, when evaluating a construct of the form saxon:stream(doc('a.xml')/a/b/c).
  CountWatch | This class is used when a streamed template requests evaluation of the count() function applied to a streamable pattern
  EmptyWatch | Streaming watch supporting the empty() function
  EventPushingWatch | A EvaluatingWatch is a Watch that evaluates an expression based on the nodes encountered in a streamed input document, appending the value of that expression to the Watch for the next expression in the streaming route.
  ExistsWatch | Streaming watch supporting the exists() function
  ForEachComposingWatch | This watch implements xsl:for-each in streaming mode, in the case where the select expression is a pattern that selects events from the streamed input, but the body of the for-each does no further downwards navigation, and delivers composed items to an ItemFeed acting as the parent expression of the for-each.
  ForEachWatch | This watch implements xsl:for-each in streaming mode.
  ForkingWatch | Process an xsl:fork instruction, by feeding events to each of multiple destinations.
  GroupAdjacentWatch | This class implements GroupingFeed when the group-adjacent option is used.
  GroupedItemStoppingFeed | This feed supports xsl:for-each-group in streaming mode.
  GroupEndingWatch | This class implements GroupingFeed when the group-ending-with option is used.
  GroupingWatch | This feed supports xsl:for-each-group in streaming mode.
  GroupStartingWatch | This class implements GroupingFeed when the group-starting-with option is used.
  IterateWatch | This watch implements xsl:iterate in streaming mode.
  NextMatchWatch | Watch for an xsl:next-match instruction.
  NonstreamingExpressionWatch | This watch is used for a streamed template that makes no access to descendant nodes.
  SimpleContentWatch | This class is used when a streaming template requests evaluation of a simple content constructor in streaming mode (that is, when it constructs a text, attribute, comment, or PI node based on the contents of the streamed document).
  StringValueAccumulator | A StringValueAccumulator is a Receiver that computes the string value of an element in streaming mode, by copying all the text nodes to a supplied receiver.
  StringValueWatch | This class is used when a streamed template requests evaluation of the string value of the nodes selected by a path expression, typically in response to an xsl:value-of instruction.
  TypedValueWatch | This class is used when a streamed template requests evaluation of the typed value of the nodes selected by a path expression.
  VoidWatch | This class is a Watch that always returns an empty sequence as its result.
  VoidWatchMaker | A singleton WatchMaker that returns the singleton `VoidWatch`
  WatchManager | This class sits on a push pipeline and evaluates the passing element and attribute nodes.

## Package com.saxonica.stream.watch Description

This package contains defines the two interfaces Watch and WatchMaker, and various implementations of these interfaces.

A Watch is used on a streaming pipeline to recognize specific events, such as the start of a selected element, and to take action when these events occur. A WatchMaker is a factory class for creating a particular kind of Watch. The WatchManager is a class that sits on the Receiver pipeline keeping track of which Watches are active, and notifying them of events so that they can decide whether they are of interest.

Michael H. Kay
Saxonica Limited
28 November 2011

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