public abstract class AbsorptionFeed extends GroundedItemFeed
Modifier and Type | Class and Description |
---|---|
static class |
AbsorptionFeed.PendingItem
A pending item represents a tree under construction.
|
pipelineConfiguration, systemId
Constructor and Description |
---|
AbsorptionFeed(ItemFeed result,
XPathContext context) |
Modifier and Type | Method and Description |
---|---|
void |
append(Item item)
Signal that a node (other than an element) that matches the selection
has been found.
|
void |
endSelectedParentNode(Location locationId)
Signal that the endElement event has occurred for the element whose startElement
event caused the Watch to be activated.
|
protected abstract AbsorptionFeed.PendingItem |
makePendingItem(int sequenceNr,
FleetingParentNode node)
Create a pending item (appropriate to the subclass) containing the data needed
to compute the result value for one node in the streamed input sequence
|
protected abstract Sequence |
processGroundedItem(Item item)
Process a grounded item in the input sequence: either a streamed leaf node such as an attribute
or text node, or an atomic value, or a non-streamed element or document node injected into the
sequence for example by use of the comma operator.
|
void |
setHasFailed()
Mark this feed as having failed (that is, as having detected and reported
a dynamic error).
|
Receiver |
startSelectedParentNode(FleetingParentNode node,
Location locationId)
Signal that an element has been found that matches the selection that this
Watch is looking for.
|
attribute, characters, comment, endDocument, endElement, namespace, processingInstruction, setUnparsedEntity, startContent, startDocument, startElement, startElement
append, close, dynamicError, getContext, getExpression, getResult, getTerminator, hasFailed, open, processItems, setExpression, setTerminator
getNextOutputter, open, usesTypeAnnotations
getConfiguration, getPipelineConfiguration, getStringReceiver, getSystemId, namespaces, setPipelineConfiguration, setSystemId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handlesAppend
public AbsorptionFeed(ItemFeed result, XPathContext context)
public final Receiver startSelectedParentNode(FleetingParentNode node, Location locationId) throws XPathException
startSelectedParentNode
in class ItemFeed
node
- the node that matches the selectionlocationId
- @throws net.sf.saxon.type.ValidationExceptionXPathException
- May be raised if a dynamic error occursprotected abstract AbsorptionFeed.PendingItem makePendingItem(int sequenceNr, FleetingParentNode node) throws XPathException
sequenceNr
- the sequence number of this node within a set of nested nodesnode
- the streamed input nodeXPathException
- if a dynamic error is detected at this stagepublic final void endSelectedParentNode(Location locationId) throws XPathException
endSelectedParentNode
in class ItemFeed
locationId
- the location of the node in the source, or of the instruction that created itXPathException
- if a dynamic error occurspublic void append(Item item) throws XPathException
append
in interface Receiver
append
in class ItemFeed
item
- the node or other item that was matched.XPathException
- if the operation failsprotected abstract Sequence processGroundedItem(Item item) throws XPathException
item
- the grounded itemXPathException
- if a dynamic error occurspublic void setHasFailed()
ItemFeed
setHasFailed
in class ItemFeed
Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.