/** * 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 */ @Override public void append(Item item, Location locationId, int copyNamespaces) throws XPathException { if (item instanceof ArrayItem) { flatten((ArrayItem) item, locationId, copyNamespaces); } else { if (item instanceof AtomicValue) { sep(); nextReceiver.characters(item.getStringValueCS(), locationId, 0); } else { decompose(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 */ @Override public void append(Item item, Location locationId, int copyNamespaces) throws XPathException { if (item instanceof ArrayItem) { flatten((ArrayItem) item, locationId, copyNamespaces); } else { if (item instanceof AtomicValue) { sep(); nextReceiver.characters(item.getStringValueCS(), locationId, 0); } else { decompose(item, locationId, copyNamespaces); } } }