// If dissecting is possible then do so.
if (isDissectionNeeded()) {
writeViaDissection(
new DOMDissectableDocumentImpl(this.document, getProtocolConfiguration()),
new DOMDissectedContentHandlerImpl(writer));
} else {
writeDocument(document, output);
}
}