Package net.sf.saxon.s9api
Interface Destination
-
- All Known Implementing Classes:
DOMDestination
,SAXDestination
,SchemaValidator
,Serializer
,TeeDestination
,XdmDestination
,XsltTransformer
public interface Destination
A Destination represents a place where XML can be sent. It is used, for example, to define the output of a transformation or query.The interface
Destination
has some similarities with the JAXPResult
class. It differs, however, in that implementations of this interface can be written by users or third parties to define new kinds of destination, and any such implementation can be supplied to the Saxon methods that take aDestination
as an argument.Implementing a new
Destination
, however, will generally require access to implementation-level classes and methods within the Saxon product. The only method that needs to be supplied isgetReceiver(net.sf.saxon.Configuration)
, which returns an instance ofReceiver
, and unless you use an existing implementation ofReceiver
, you will need to handle internal Saxon concepts such as name codes and name pools.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Receiver
getReceiver(Configuration config)
Return a Receiver.
-
-
-
Method Detail
-
getReceiver
Receiver getReceiver(Configuration config) throws SaxonApiException
Return a Receiver. Saxon calls this method to obtain a Receiver, to which it then sends a sequence of events representing the content of an XML document.- Parameters:
config
- The Saxon configuration. This is supplied so that the destination can use information from the configuration (for example, a reference to the name pool) to construct or configure the returned Receiver.- Returns:
- the Receiver to which events are to be sent. It is the caller's responsibility to
initialize this Receiver with a
PipelineConfiguration
before calling itsopen()
method. - Throws:
SaxonApiException
- if the Receiver cannot be created
-
-