Class SimpleContentFeed

All Implemented Interfaces:
Result, Receiver

public class SimpleContentFeed extends AbsorptionFeed
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).

The result of this Watch is a single string, constructed using the rules of "Constructing Simple Content" in the XSLT specification.

The AdjacentTextNodeMergerFeed is used when the node is constructed as a result of a computation on the streamed data, for example xsl:value-of select="distinct-values(.//@price)". By contrast, a SimpleContentWatch is used when the streamed nodes are selected directly, for example xsl:value-of select=".//@price".

Both a Feed and a Watch are needed because a simple content constructor operates on a sequence of nodes without simply atomizing the sequence.

  • Constructor Details

    • SimpleContentFeed

      public SimpleContentFeed(ItemFeed result)
  • Method Details

    • makePendingItem

      protected AbsorptionFeed.PendingItem makePendingItem(int sequenceNr, FleetingParentNode node)
      Description copied from class: AbsorptionFeed
      Create a pending item (appropriate to the subclass) containing the data needed to compute the result value for one node in the streamed input sequence
      Specified by:
      makePendingItem in class AbsorptionFeed
      Parameters:
      sequenceNr - the sequence number of this node within a set of nested nodes
      node - the streamed input node
      Returns:
      the data needed to process this node
    • processGroundedItem

      protected Sequence processGroundedItem(Item item) throws XPathException
      Description copied from class: AbsorptionFeed
      Process a grounded item in the input sequence: either a streamed leaf node such as an attribute or text node, or an atomic value, or a non-streamed element or document node injected into the sequence for example by use of the comma operator.
      Specified by:
      processGroundedItem in class AbsorptionFeed
      Parameters:
      item - the grounded item
      Returns:
      the result of processing the grounded item
      Throws:
      XPathException - if a dynamic error occurs