public class CopyOfFeed extends AbsorptionFeed
Modifier and Type | Class and Description |
---|---|
static class |
CopyOfFeed.AccumulatorCopier |
AbsorptionFeed.PendingItem
Constructor and Description |
---|
CopyOfFeed(WatchManager watchManager,
Feed result,
XPathContext context) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Finish evaluating the expression.
|
void |
dynamicError(XPathException error)
Report a dynamic error.
|
SequenceReceiver |
getReceiver()
Get a receiver to which start and end events for documents and elements can be
written.
|
static Trigger |
getWatch(Feed result,
Pattern selection,
WatchManager wm,
XPathContext context)
Create a Watch whose effect is to create copies of the selected (streamed) nodes and pass
them to the supplied feed
|
protected 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 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 |
setCopyAccumulators(boolean copy)
Say whether accumulators are to be copied
|
void |
setCopyNamespaces(boolean copy)
Say whether unused namespaces are to be copied
|
void |
setValidationOptions(int validation,
SchemaType type)
Set the options for schema validation
|
endSelectedParentNode, processItem, setHasFailed, startSelectedParentNode
getContext, getExpression, getPipelineConfiguration, getResult, getTerminator, hasFailed, open, processItems, setExpression, setPipelineConfiguration, setTerminator
public CopyOfFeed(WatchManager watchManager, Feed result, XPathContext context)
public static Trigger getWatch(Feed result, Pattern selection, WatchManager wm, XPathContext context)
result
- The feed to which the copied nodes should be suppliedselection
- defines the nodes to be selectedwm
- The WatchManager that will notify the selected nodescontext
- the XPath evaluation contextpublic void close() throws XPathException
ItemFeed
close
in interface Feed
close
in class ItemFeed
XPathException
- if a dynamic error occurspublic void setCopyNamespaces(boolean copy)
copy
- true if unused namespace declarations should be copied to the result tree
(this is the defaultpublic void setCopyAccumulators(boolean copy)
copy
- true if unused namespace declarations should be copied to the result tree
(this is the defaultpublic void setValidationOptions(int validation, SchemaType type)
validation
- the validation mode, e.g. strict, lax, preserve, striptype
- the type to validate againstpublic SequenceReceiver getReceiver()
getReceiver
in interface Feed
getReceiver
in class ItemFeed
protected AbsorptionFeed.PendingItem makePendingItem(int sequenceNr, FleetingParentNode node)
AbsorptionFeed
makePendingItem
in class AbsorptionFeed
sequenceNr
- the sequence number of this node within a set of nested nodesnode
- the streamed input nodeprotected Sequence processGroundedItem(Item item) throws XPathException
AbsorptionFeed
processGroundedItem
in class AbsorptionFeed
item
- the grounded itemXPathException
- if a dynamic error occurspublic void dynamicError(XPathException error) throws XPathException
dynamicError
in class ItemFeed
error
- the exception representing the dynamic errorXPathException
- if there is no try/catch expression wanting to catch this errorCopyright (c) 2004-2018 Saxonica Limited. All rights reserved.