// FIXME: Hack. There should be a better way...
if (wpipe instanceof Pipe) {
ReadablePipe rpipe = new Pipe(runtime, ((Pipe) wpipe).documents());
rpipe.canReadSequence(true);
rpipe.setReader(step);
while (rpipe.moreDocuments()) {
XdmNode doc = rpipe.read();
runtime.cache(doc, step.getNode().getBaseURI());
}
}
}