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, systemId
Fields 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 TypeMethodDescriptionvoid
Supply an item to the feedvoid
close()
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, startSelectedParentNode
Methods inherited from class net.sf.saxon.event.ProxyOutputter
attribute, characters, comment, endDocument, endElement, getNextOutputter, namespace, open, processingInstruction, setUnparsedEntity, startContent, startDocument, startElement, startElement, usesTypeAnnotations
Methods inherited from class net.sf.saxon.event.Outputter
getConfiguration, getPipelineConfiguration, getSystemId, namespaces, setPipelineConfiguration, setSystemId, spreadStartElement
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.sf.saxon.event.Receiver
handlesAppend
-
Constructor Details
-
SimpleNodeConstructorFeed
-
-
Method Details
-
append
Supply an item to the feed- Specified by:
append
in interfaceReceiver
- Specified by:
append
in classItemFeed
- Parameters:
item
- the item being fed- Throws:
XPathException
- to report any failure
-
getStringReceiver
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 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:ItemFeed
Finish evaluating the expression.- Specified by:
close
in interfaceReceiver
- Overrides:
close
in classItemFeed
- Throws:
XPathException
- if a dynamic error occurs
-