The SAX ContentHandler omits the event of XML Declaration. Applications currently have no way of reading the declaration with a SAX handler. This is an issue for applications that wish to preserve the original declaration.
JDK-8230824Enable SAX ContentHandler to handle XML Declaration
JDK-8230359Transform results in inconsistent declarations with the sources