Class SimpleNodeConstructorFeed

All Implemented Interfaces:
Result, Receiver

public class SimpleNodeConstructorFeed extends ItemFeed
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 SimpleContentFeed 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

  • Method Details

    • append

      public void append(Item item) throws XPathException
      Supply an item to the feed
      Specified by:
      append in interface Receiver
      Specified by:
      append in class ItemFeed
      Parameters:
      item - the item being fed
      Throws:
      XPathException - to report any failure
    • getStringReceiver

      public UniStringConsumer getStringReceiver(boolean asTextNode, Location loc)
      Description copied from class: Outputter
      Get a string-value consumer object that allows an item of type xs:string to be appended one fragment at a time. This potentially allows operations that output large strings to avoid building the entire string in memory. The default implementation, however, simply assembles the string in a buffer and releases the entire string on completion.
      Overrides:
      getStringReceiver in class Outputter
      Parameters:
      asTextNode - set to true if the concatenated string values are to be treated as a text node item rather than a string
      Returns:
      an object that accepts xs:string values via a sequence of append() calls
    • close

      public void close() throws XPathException
      Description copied from class: ItemFeed
      Finish evaluating the expression.
      Specified by:
      close in interface Receiver
      Overrides:
      close in class ItemFeed
      Throws:
      XPathException - if a dynamic error occurs