private IndexedDocument<Node, Element, Text> getDocument() {
if (substrateDocument == null) {
try {
createSubstrateDocument();
} catch (OperationException e) {
throw new OperationRuntimeException(
"Document initialization failed when applying operation: " +
documentCreationContext.content, e);
}
}
return substrateDocument;