document.getPublicId(), document.getCodec(),
outputStringTable, document.getStringFactory());
// Visit down in to the document to serialise it.
visitElement(document.getRootElement());
// Complete the output string table, if neccessary.
resolver.markComplete();
// Finish off the document.
handler.endDocument();
} catch (WBSAXException e) {
throw new WBDOMException(
exceptionLocalizer.format("wbdom-document-write-error"),