private Receiver getDestinationReceiver(Destination destination) throws SaxonApiException { Executable exec = expression.getExecutable(); PipelineConfiguration pipe = expression.getConfiguration().makePipelineConfiguration(); Receiver out = destination.getReceiver(pipe, exec.getPrimarySerializationProperties()); if (Configuration.isAssertionsEnabled()) { return new RegularSequenceChecker(out); } else { return out; } }
private Receiver getDestinationReceiver(Destination destination) throws SaxonApiException { Executable exec = expression.getExecutable(); PipelineConfiguration pipe = expression.getConfiguration().makePipelineConfiguration(); Receiver out = destination.getReceiver(pipe, exec.getPrimarySerializationProperties()); if (Configuration.isAssertionsEnabled()) { return new RegularSequenceChecker(out); } else { return out; } }
/** * Get a Receiver corresponding to the chosen Destination for the transformation * @param destination the destination for the results of this transformation * @return a receiver that sends the results to this destination * @throws SaxonApiException if anything goes wrong */ public Receiver getDestinationReceiver(XsltController controller, Destination destination) throws SaxonApiException { Receiver receiver; controller.setPrincipalDestination(destination); PipelineConfiguration pipe = controller.makePipelineConfiguration(); SerializationProperties params = controller.getExecutable().getPrimarySerializationProperties(); receiver = destination.getReceiver(pipe, params); if (Configuration.isAssertionsEnabled()) { receiver = new RegularSequenceChecker(receiver); } receiver.getPipelineConfiguration().setController(controller); if (baseOutputUriWasSet) { try { if (destination.getDestinationBaseURI() == null) { destination.setDestinationBaseURI(new URI(controller.getBaseOutputURI())); } } catch (URISyntaxException e) { // no action } } else if (destination.getDestinationBaseURI() != null) { controller.setBaseOutputURI(destination.getDestinationBaseURI().toASCIIString()); } receiver.setSystemId(controller.getBaseOutputURI()); return receiver; }
/** * Get a Receiver corresponding to the chosen Destination for the transformation * @param destination the destination for the results of this transformation * @return a receiver that sends the results to this destination * @throws SaxonApiException if anything goes wrong */ public Receiver getDestinationReceiver(XsltController controller, Destination destination) throws SaxonApiException { Receiver receiver; controller.setPrincipalDestination(destination); PipelineConfiguration pipe = controller.makePipelineConfiguration(); SerializationProperties params = controller.getExecutable().getPrimarySerializationProperties(); receiver = destination.getReceiver(pipe, params); if (Configuration.isAssertionsEnabled()) { receiver = new RegularSequenceChecker(receiver); } receiver.getPipelineConfiguration().setController(controller); if (baseOutputUriWasSet) { try { if (destination.getDestinationBaseURI() == null) { destination.setDestinationBaseURI(new URI(controller.getBaseOutputURI())); } } catch (URISyntaxException e) { // no action } } else if (destination.getDestinationBaseURI() != null) { controller.setBaseOutputURI(destination.getDestinationBaseURI().toASCIIString()); } receiver.setSystemId(controller.getBaseOutputURI()); return receiver; }