Package com.saxonica.ee.stream.feed
Class SimpleNodeConstructorFeed
java.lang.Object
net.sf.saxon.event.Outputter
net.sf.saxon.event.ProxyOutputter
com.saxonica.ee.stream.feed.ItemFeed
com.saxonica.ee.stream.feed.SimpleNodeConstructorFeed
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.
-
Field Summary
Fields inherited from class net.sf.saxon.event.Outputter
pipelineConfiguration, systemIdFields inherited from interface javax.xml.transform.Result
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING -
Constructor Summary
ConstructorsConstructorDescriptionSimpleNodeConstructorFeed(Expression expr, ItemFeed result, XPathContext context) -
Method Summary
Modifier and TypeMethodDescriptionvoidSupply an item to the feedvoidclose()Finish evaluating the expression.getStringReceiver(boolean asTextNode, Location loc) Get a string-value consumer object that allows an item of type xs:string to be appended one fragment at a time.Methods inherited from class com.saxonica.ee.stream.feed.ItemFeed
append, dynamicError, endSelectedParentNode, getContext, getExpression, getResultFeed, getTerminator, hasFailed, open, processItems, setExpression, setHasFailed, setTerminator, startSelectedParentNodeMethods inherited from class net.sf.saxon.event.ProxyOutputter
attribute, characters, comment, endDocument, endElement, getNextOutputter, namespace, open, processingInstruction, setUnparsedEntity, startContent, startDocument, startElement, startElement, usesTypeAnnotationsMethods inherited from class net.sf.saxon.event.Outputter
getConfiguration, getPipelineConfiguration, getSystemId, namespaces, setPipelineConfiguration, setSystemId, spreadStartElementMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sf.saxon.event.Receiver
handlesAppend
-
Constructor Details
-
SimpleNodeConstructorFeed
-
-
Method Details
-
append
Supply an item to the feed- Specified by:
appendin interfaceReceiver- Specified by:
appendin classItemFeed- Parameters:
item- the item being fed- Throws:
XPathException- to report any failure
-
getStringReceiver
Description copied from class:OutputterGet 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:
getStringReceiverin classOutputter- 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
Description copied from class:ItemFeedFinish evaluating the expression.- Specified by:
closein interfaceReceiver- Overrides:
closein classItemFeed- Throws:
XPathException- if a dynamic error occurs
-