public Receiver getReceiver(Configuration config) throws SaxonApiException {
if (destination == null) {
throw new IllegalStateException("No destination has been supplied");
}
TransformerReceiver tr = new TransformerReceiver(controller);
tr.setResult(destination.getReceiver(config));
tr.setPipelineConfiguration(controller.makePipelineConfiguration());
return tr;
}