// CAPs namespaces to itself to ensure that default namespaces (and
// others will work).
ContextAnnotatingProcess cap = new ContextAnnotatingProcess(true);
if (next instanceof ContextAnnotatingProcess) {
ContextAnnotatingProcess nextCAP = (ContextAnnotatingProcess) next;
nextCAP.copyNamespacePrefixes(cap);
}
cap.setPipeline(getPipeline());
cap.setNextProcess(adapter);