/** * Append an arbitrary item (node or atomic value) to the output * * @param item the item to be appended * @param locationId the location of the calling instruction, for diagnostics * @param copyNamespaces if the item is an element node, this indicates whether its namespaces * need to be copied. Values are {@link ReceiverOptions#ALL_NAMESPACES}, * {@link ReceiverOptions#LOCAL_NAMESPACES}; the default (0) means * no namespaces */ public void append(Item item, Location locationId, int copyNamespaces) throws XPathException { // Decompose the item into a sequence of node events if we're within a start/end element/document // pair. Otherwise, send the item down the pipeline unchanged: it's the job of the Destination // to deal with it (inserting item separators if appropriate) if (level >= 0) { decompose(item, locationId, copyNamespaces); } else { nextReceiver.append(item, locationId, copyNamespaces); } }
/** * Append an arbitrary item (node or atomic value) to the output * * @param item the item to be appended * @param locationId the location of the calling instruction, for diagnostics * @param copyNamespaces if the item is an element node, this indicates whether its namespaces * need to be copied. Values are {@link ReceiverOptions#ALL_NAMESPACES}, * {@link ReceiverOptions#LOCAL_NAMESPACES}; the default (0) means * no namespaces */ public void append(Item item, Location locationId, int copyNamespaces) throws XPathException { // Decompose the item into a sequence of node events if we're within a start/end element/document // pair. Otherwise, send the item down the pipeline unchanged: it's the job of the Destination // to deal with it (inserting item separators if appropriate) if (level >= 0) { decompose(item, locationId, copyNamespaces); } else { nextReceiver.append(item, locationId, copyNamespaces); } }