public StreamTester(PipelineConfiguration pipe) { super(new Sink(pipe)); }
@Override public Receiver getReceiver(PipelineConfiguration pipe, SerializationProperties params) { return new Sink(pipe); }
public void open() { nextReceiver = new Sink(); }
private PackageInspector(PipelineConfiguration pipe) { super(new Sink(pipe)); }
public StreamTester(PipelineConfiguration pipe) { super(new Sink(pipe)); }
public void open() { nextReceiver = new Sink(); }
private PackageInspector(PipelineConfiguration pipe) { super(new Sink(pipe)); }
public void open() { nextReceiver = new Sink(); }
private CharacterMapExpander makeCharacterMapExpander(PipelineConfiguration pipe, Properties props, CharacterMapIndex charMapIndex) throws XPathException { String useMaps = props.getProperty(SaxonOutputKeys.USE_CHARACTER_MAPS); if (useMaps != null) { return charMapIndex.makeCharacterMapExpander(useMaps, new Sink(pipe), this); } return null; }
/** * Create an uncommitted Serializer * @param finalResult the output destination * @param outputProperties the serialization properties */ public UncommittedSerializer(Result finalResult, Properties outputProperties) { this.finalResult = finalResult; this.outputProperties = outputProperties; setUnderlyingReceiver(new Sink()); }
/** * Create an uncommitted Serializer * @param finalResult the output destination * @param outputProperties the serialization properties */ public UncommittedSerializer(Result finalResult, Properties outputProperties) { this.finalResult = finalResult; this.outputProperties = outputProperties; setUnderlyingReceiver(new Sink()); }
private ProxyReceiver makeUnicodeNormalizer(PipelineConfiguration pipe, Properties props) throws XPathException { String normForm = props.getProperty(SaxonOutputKeys.NORMALIZATION_FORM); if (normForm != null && !normForm.equals("none")) { return newUnicodeNormalizer(new Sink(pipe), props); } return null; }
private CharacterMapExpander makeCharacterMapExpander(PipelineConfiguration pipe, Properties props, CharacterMapIndex charMapIndex) throws XPathException { String useMaps = props.getProperty(SaxonOutputKeys.USE_CHARACTER_MAPS); if (useMaps != null) { return charMapIndex.makeCharacterMapExpander(useMaps, new Sink(pipe), this); } return null; }
/** * Start of event stream */ public void open() throws XPathException { System.err.println("RCVR " + id + indent + " OPEN"); if (nextReceiver == null) { nextReceiver = new Sink(); } nextReceiver.open(); }
private ProxyReceiver makeUnicodeNormalizer(PipelineConfiguration pipe, Properties props) throws XPathException { String normForm = props.getProperty(SaxonOutputKeys.NORMALIZATION_FORM); if (normForm != null && !normForm.equals("none")) { return newUnicodeNormalizer(new Sink(pipe), props); } return null; }
/** * Start of event stream */ public void open() throws XPathException { System.err.println("RCVR " + id + indent + " OPEN"); if (nextReceiver == null) { nextReceiver = new Sink(); } nextReceiver.open(); }
/** * Make a Stripper configured to implement the whitespace stripping rules. * In the case of XSLT the whitespace stripping rules are normally defined * by <code>xsl:strip-space</code> and <code>xsl:preserve-space</code> elements * in the stylesheet. Alternatively, stripping of all whitespace text nodes * may be defined at the level of the Configuration, using the code * {@code Configuration.getParseOptions().setSpaceStrippingRules(AllElementsSpaceStrippingRule.getInstance()}. * * @param next the Receiver to which the events filtered by this stripper are * to be sent (often a Builder). May be null if the stripper is not being used for filtering * into a Builder or other Receiver. * @return the required Stripper. A Stripper may be used in two ways. It acts as * a filter applied to an event stream, that can be used to remove the events * representing whitespace text nodes before they reach a Builder. Alternatively, * it can be used to define a view of an existing tree in which the whitespace * text nodes are dynamically skipped while navigating the XPath axes. * @since 8.4 - Generalized in 8.5 to accept any Receiver as an argument */ public Stripper makeStripper(/*@Nullable*/ Receiver next) { if (next == null) { next = new Sink(makePipelineConfiguration()); } return new Stripper(getSpaceStrippingRule(), next); }
/** * Make a Stripper configured to implement the whitespace stripping rules. * In the case of XSLT the whitespace stripping rules are normally defined * by <code>xsl:strip-space</code> and <code>xsl:preserve-space</code> elements * in the stylesheet. Alternatively, stripping of all whitespace text nodes * may be defined at the level of the Configuration, using the code * {@code Configuration.getParseOptions().setSpaceStrippingRules(AllElementsSpaceStrippingRule.getInstance()}. * * @param next the Receiver to which the events filtered by this stripper are * to be sent (often a Builder). May be null if the stripper is not being used for filtering * into a Builder or other Receiver. * @return the required Stripper. A Stripper may be used in two ways. It acts as * a filter applied to an event stream, that can be used to remove the events * representing whitespace text nodes before they reach a Builder. Alternatively, * it can be used to define a view of an existing tree in which the whitespace * text nodes are dynamically skipped while navigating the XPath axes. * @since 8.4 - Generalized in 8.5 to accept any Receiver as an argument */ public Stripper makeStripper(/*@Nullable*/ Receiver next) { if (next == null) { next = new Sink(makePipelineConfiguration()); } return new Stripper(getSpaceStrippingRule(), next); }
Configuration config, URIResolver resolver, Source source, String media, String title, String charset) throws XPathException { PIGrabber grabber = new PIGrabber(new Sink(config.makePipelineConfiguration())); grabber.setFactory(config); grabber.setCriteria(media, title);
private Receiver getReceiver(Configuration config, String systemId) throws SaxonApiException { PipelineConfiguration pipe = config.makePipelineConfiguration(); pipe.setExpandAttributeDefaults(expandAttributeDefaults); Receiver output = (destination == null ? new Sink() : destination.getReceiver(config)); output.setPipelineConfiguration(pipe); int topLevelElement = -1; if (documentElementName != null) { topLevelElement = config.getNamePool().allocate( "", documentElementName.getNamespaceURI(), documentElementName.getLocalName()); } Receiver receiver = config.getDocumentValidator( output, systemId, (lax ? Validation.LAX : Validation.STRICT) | Validation.VALIDATE_OUTPUT, Whitespace.NONE, documentElementType, topLevelElement); if (errorListener != null) { pipe.setErrorListener(errorListener); } return receiver; }