net.sf.saxon.s9api
public interface Destination
In general a Destination
is designed to hold a single document.
It should therefore not be used as the destination of a query that produces multiple
documents. The effect of sending multiple documents to a Destination
depends on the kind of Destination
.
The interface Destination
has some similarities with the JAXP
javax.xml.transform.Result 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 a Destination
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 is Destination, which returns an instance of
Receiver, and unless you use an existing implementation of
Receiver
, you will need to handle internal Saxon concepts such as name codes
and name pools.
Method Summary | |
---|---|
Receiver | getReceiver(Configuration config)
Return a Receiver. |
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
its open()
method.
Throws: SaxonApiException if the Receiver cannot be created