//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2018 Saxonica Limited. // This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. // If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. // This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// package net.sf.saxon.event; import net.sf.saxon.expr.parser.Location; import net.sf.saxon.om.Item; import net.sf.saxon.om.NamespaceBindingSet; import net.sf.saxon.om.NodeName; import net.sf.saxon.type.SchemaType; import net.sf.saxon.type.SimpleType; /** * A Sink is an Receiver that discards all information passed to it */ public class Sink extends SequenceReceiver { public Sink(PipelineConfiguration pipe) { super(pipe); } /** * Start of event stream */ public void open() { } /** * End of event stream */ public void close() { } /** * Start of a document node. */ public void startDocument(int properties) { } /** * Notify the end of a document node */ public void endDocument() { } /** * Notify the start of an element * @param nameCode integer code identifying the name of the element within the name pool. * @param typeCode integer code identifying the element's type within the name pool. * @param location * @param properties for future use. Should be set to zero. */ public void startElement(NodeName nameCode, SchemaType typeCode, Location location, int properties) { } /** * Notify a namespace. Namespaces are notified after the startElement event, and before * any children for the element. The namespaces that are reported are only required * to include those that are different from the parent element; however, duplicates may be reported. * A namespace must not conflict with any namespaces already used for element or attribute names. * * @param namespaceBindings the prefix/uri pair representing the namespace binding to be written * @throws java.lang.IllegalStateException: * attempt to output a namespace when there is no open element * start tag */ public void namespace(NamespaceBindingSet namespaceBindings, int properties) { } /** * Notify an attribute. Attributes are notified after the startElement event, and before any * children. Namespaces and attributes may be intermingled. * * @param nameCode The name of the attribute * @param typeCode The type of the attribute * @param locationId the location of the node in the source, or of the instruction that created it * @param properties Bit significant value. The following bits are defined: *