/** * Return a Receiver. This method is intended primarily for internal use, though it can also * be called by a user application that wishes to feed events into the transformation engine. * * <p>Saxon calls this method to obtain a Receiver, to which it then sends * a sequence of events representing the content of an XML document. This method is provided so that * <code>XsltTransformer</code> implements <code>Destination</code>, allowing one transformation * to receive the results of another in a pipeline.</p> * * <p>Note that when an <code>XsltTransformer</code> is used as a <code>Destination</code>, the initial * context node set on that <code>XsltTransformer</code> is ignored.</p> * * @param 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. * @return the Receiver to which events are to be sent. * @throws SaxonApiException if the Receiver cannot be created */ 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; }
nextTransformer.setResult(result); nextTransformer.open();
nextTransformer.setResult(result); nextTransformer.open();