tree.startDocument(step.getNode().getBaseURI());
tree.addStartElement(XProcConstants.c_result);
tree.startContent();
tree.addText(id.toASCIIString());
tree.addEndElement();
tree.endDocument();
result.write(tree.getResult());
} catch (XProcException e) {
throw e;
} catch (Exception e) {
throw new XProcException(step.getNode(), "Failed to process FO document", e);