Search in sources :

Example 1 with ProcessingInstructionImpl

use of org.exist.dom.persistent.ProcessingInstructionImpl in project exist by eXist-db.

the class Indexer method processingInstruction.

@Override
public void processingInstruction(final String target, final String data) {
    final ProcessingInstructionImpl pi = new ProcessingInstructionImpl(target, data);
    pi.setOwnerDocument(document);
    if (stack.isEmpty()) {
        pi.setNodeId(broker.getBrokerPool().getNodeFactory().createInstance(nodeFactoryInstanceCnt++));
        if (!validate)
            broker.storeNode(transaction, pi, currentPath, indexSpec);
        document.appendChild((NodeHandle) pi);
    } else {
        final ElementImpl last = stack.peek();
        processText(last, ProcessTextParent.PI);
        last.appendChildInternal(prevNode, pi);
        setPrevious(pi);
        if (!validate)
            broker.storeNode(transaction, pi, currentPath, indexSpec);
    }
}
Also used : ElementImpl(org.exist.dom.persistent.ElementImpl) ProcessingInstructionImpl(org.exist.dom.persistent.ProcessingInstructionImpl)

Aggregations

ElementImpl (org.exist.dom.persistent.ElementImpl)1 ProcessingInstructionImpl (org.exist.dom.persistent.ProcessingInstructionImpl)1