Package net.sf.saxon.event
Class SequenceReceiver
java.lang.Object
net.sf.saxon.event.SequenceReceiver
- Direct Known Subclasses:
- Emitter,- EventBuffer,- ProxyReceiver,- SequenceWrapper,- SequenceWriter,- Sink,- TeeOutputter,- TreeReceiver,- WatchManager
SequenceReceiver: this extension of the Receiver interface is used when processing
 a sequence constructor. It differs from the Receiver in allowing items (atomic values or
 nodes) to be added to the sequence, not just tree-building events.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected PipelineConfigurationprotected booleanprotected StringFields inherited from interface javax.xml.transform.ResultPI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidAppend an arbitrary item (node, atomic value, or function) to the output.abstract voidAppend an arbitrary item (node, atomic value, or function) to the outputprotected voidHelper method for subclasses to invoke if required: decompose an item into a sequence of node events.protected voidHelper method for subclasses to invoke if required: flatten an array.final ConfigurationGet the Saxon Configurationprotected StringGet the name poolfinal PipelineConfigurationGet the pipeline configurationGet the system IDbooleanAsk whether this Receiver can handle arbitrary items in itsOutputter.append(net.sf.saxon.om.Item, net.sf.saxon.s9api.Location, int)andOutputter.append(Item, Location, int)methods.voidopen()Start the output processvoidsetPipelineConfiguration(PipelineConfiguration pipelineConfiguration) Set the pipeline configurationvoidsetSystemId(String systemId) Set the system IDvoidsetUnparsedEntity(String name, String systemID, String publicID) Notify an unparsed entity URI.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sf.saxon.event.Receivercharacters, close, comment, endDocument, endElement, processingInstruction, startDocument, startElement, usesTypeAnnotations
- 
Field Details- 
previousAtomicprotected boolean previousAtomic
- 
pipelineConfiguration
- 
systemId
 
- 
- 
Constructor Details- 
SequenceReceiverCreate a SequenceReceiver- Parameters:
- pipe- the pipeline configuration
 
 
- 
- 
Method Details- 
getPipelineConfigurationDescription copied from interface:ReceiverGet the pipeline configuration- Specified by:
- getPipelineConfigurationin interface- Receiver
- Returns:
- the pipeline configuration
 
- 
setPipelineConfigurationDescription copied from interface:ReceiverSet the pipeline configuration- Specified by:
- setPipelineConfigurationin interface- Receiver
- Parameters:
- pipelineConfiguration- the pipeline configuration
 
- 
getConfigurationGet the Saxon Configuration- Returns:
- the Configuration
 
- 
setSystemIdSet the system ID- Specified by:
- setSystemIdin interface- Result
- Parameters:
- systemId- the URI used to identify the tree being passed across this interface
 
- 
getSystemIdGet the system ID- Specified by:
- getSystemIdin interface- Result
- Returns:
- the system ID that was supplied using the setSystemId() method
 
- 
setUnparsedEntityNotify an unparsed entity URI.- Specified by:
- setUnparsedEntityin interface- Receiver
- Parameters:
- name- The name of the unparsed entity
- systemID- The system identifier of the unparsed entity
- publicID- The public identifier of the unparsed entity
- Throws:
- XPathException- if an error occurs
 
- 
openStart the output process- Specified by:
- openin interface- Receiver
- Throws:
- XPathException- if an error occurs
 
- 
appendAppend an arbitrary item (node, atomic value, or function) to the output- Specified by:
- appendin interface- Receiver
- Parameters:
- item- the item to be appended
- locationId- the location of the calling instruction, for diagnostics
- properties- if the item is an element node, this indicates whether its namespaces need to be copied. Values are- ReceiverOption.ALL_NAMESPACES; the default (0) means
- Throws:
- XPathException- if an error occurs
 
- 
appendAppend an arbitrary item (node, atomic value, or function) to the output. By default, if the item is an element node, it is copied with all namespaces.- Specified by:
- appendin interface- Receiver
- Parameters:
- item- the item to be appended
- Throws:
- XPathException- if the operation fails
 
- 
getNamePoolGet the name pool- Returns:
- the Name Pool that was supplied using the setConfiguration() method
 
- 
flattenprotected void flatten(ArrayItem array, Location locationId, int copyNamespaces) throws XPathException Helper method for subclasses to invoke if required: flatten an array. The effect is that each item in each member of the array is appended to thisSequenceReceiverby calling itsmethod- Parameters:
- array- the array to be flattened
- locationId- the location of the instruction triggering this operation
- copyNamespaces- options for copying namespace nodes
- Throws:
- XPathException- if things go wrong
 
- 
decomposeHelper method for subclasses to invoke if required: decompose an item into a sequence of node events. Note that when this is used, methods such as characters(), comment(), startElement(), and processingInstruction() are responsible for setting previousAtomic to false.- Parameters:
- item- the item to be decomposed (that is, to be delivered to this- SequenceReceiveras a sequence of separate events
- locationId- the location of the originating instruction
- copyNamespaces- options for copying namespace nodes
- Throws:
- XPathException- if things go wrong
 
- 
getErrorCodeForDecomposingFunctionItems
- 
handlesAppendpublic boolean handlesAppend()Ask whether this Receiver can handle arbitrary items in itsOutputter.append(net.sf.saxon.om.Item, net.sf.saxon.s9api.Location, int)andOutputter.append(Item, Location, int)methods. If it cannot, then calling these methods will raise an exception (typically but not necessarily anUnsupportedOperationException). This implementation returns true.- Specified by:
- handlesAppendin interface- Receiver
- Returns:
- true if the Receiver is able to handle items supplied to
      its Outputter.append(net.sf.saxon.om.Item, net.sf.saxon.s9api.Location, int)andOutputter.append(Item, Location, int)methods. A receiver that returns true may still reject some kinds of item, for example it may reject function items.
 
 
-