net.sf.saxon.s9api
Interface Destination

All Known Implementing Classes:
DOMDestination, SAXDestination, SchemaValidator, Serializer, 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 JAXP 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 getReceiver(net.sf.saxon.Configuration), 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.
 

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.
Throws:
SaxonApiException - if the Receiver cannot be created


Copyright (C) Michael H. Kay. All rights reserved.