Class SimpleNodeConstructorFeed

  • All Implemented Interfaces:
    javax.xml.transform.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.

    • Method Detail

      • 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