elharo opened a new pull request, #123: URL: https://github.com/apache/xerces-j/pull/123
Fixes [XERCESJ-1718](https://issues.apache.org/jira/browse/XERCESJ-1718). Confirmed: a document whose document type has neither an external nor an internal subset is serialized without the `<!DOCTYPE ...>` declaration when Xerces' built-in DOM Level 3 serializer (`org.apache.xml.serialize.DOMSerializerImpl`) is used. When the separate Xalan serializer JAR is on the classpath, `CoreDOMImplementationImpl` uses that implementation instead, which already handles this case. The built-in serializer only emitted a DOCTYPE when a system identifier or a non-empty internal subset was present. It now tracks whether the document has a document type and emits `<!DOCTYPE name>` even when both identifiers and the internal subset are absent. Added `TestDocumentTypeSerialization`, which fails before the fix and passes after it. `ant test` passes. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
