Package com.saxonica.ee.stream.feed
Class GeneralComparisonMinimaxFeed
java.lang.Object
net.sf.saxon.event.Outputter
net.sf.saxon.event.ProxyOutputter
com.saxonica.ee.stream.feed.ItemFeed
com.saxonica.ee.stream.feed.AtomicItemFeed
com.saxonica.ee.stream.feed.GeneralComparisonMinimaxFeed
This class is used when a streaming template requests a general comparison with one operand
being pushed from the streamed input document, and the other being evaluated in pull mode.
It is used for the operators lt, le, gt, ge.
The unstreamed operand is evaluated when the first streamed item is encountered. At this point we build a list of all the values from the unstreamed operand, unconverted, plus the min and max of all numeric values including all untyped values that are castable to numeric.
Each streamed input value is then compared against this data. If the streamed input value is numeric, or is untyped and castable to numeric, then it is compared with the min and max numeric values. Otherwise, it is compared against the complete list of unconverted values.
-
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
ConstructorsConstructorDescriptionGeneralComparisonMinimaxFeed(WatchManager watchManager, Expression expr, int pushedArg, ItemFeed result, XPathContext context) -
Method Summary
Modifier and TypeMethodDescriptionvoidSupply an item to the feedvoidclose()Finish evaluating the expression.voidopen(Terminator terminator) Start evaluating the expression.Methods inherited from class com.saxonica.ee.stream.feed.AtomicItemFeed
attribute, characters, comment, endDocument, endElement, namespace, processingInstruction, setUnparsedEntity, startContent, startDocument, startElement, startElementMethods inherited from class com.saxonica.ee.stream.feed.ItemFeed
append, dynamicError, endSelectedParentNode, getContext, getExpression, getResultFeed, getTerminator, hasFailed, processItems, setExpression, setHasFailed, setTerminator, startSelectedParentNodeMethods inherited from class net.sf.saxon.event.ProxyOutputter
getNextOutputter, open, usesTypeAnnotationsMethods inherited from class net.sf.saxon.event.Outputter
getConfiguration, getPipelineConfiguration, getStringReceiver, 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
-
GeneralComparisonMinimaxFeed
public GeneralComparisonMinimaxFeed(WatchManager watchManager, Expression expr, int pushedArg, ItemFeed result, XPathContext context)
-
-
Method Details
-
open
Description copied from class:ItemFeedStart evaluating the expression. The default implementation does nothing.- Overrides:
openin classItemFeed- Parameters:
terminator- used to achieve early exit- Throws:
XPathException- if a dynamic error occurs
-
append
Supply an item to the feed- Specified by:
appendin interfaceReceiver- Specified by:
appendin classItemFeed- Parameters:
item- the item being fed (in this case, an item in the "pushed" operand sequence that is being compared- Throws:
XPathException- to report any failure
-
close
Description copied from class:ItemFeedFinish evaluating the expression.- Specified by:
closein interfaceReceiver- Overrides:
closein classItemFeed- Throws:
XPathException- if a dynamic error occurs
-