DTD default attributes missing after parser validation mode change
0 reputation · 08 Aug 2026, 05:26 UTC
We are preparing to migrate a small XML application to a newer parser without service interruption. The current pipeline validates documents against an internal DTD, and downstream logic relies on default attribute values declared in that DTD. The target parser documentation states that default attribute insertion occurs only during DTD validation, but it is not clear whether the new default configuration will preserve those attributes when validation is disabled or when XML Schema validation is used instead.
Because the migration must be transparent to consumers, we need to determine how to predict infoset changes for documents that depend on DTD defaults. We also need to know whether parser settings can retain default attribute injection without full DTD validation, or whether documents must be normalized before parsing.
Does the newer parser inject DTD default attributes in non-validating mode? If validation switches to XSD, are DTD-declared defaults omitted entirely? What comparison method reliably detects attribute differences between the old and new parser for these documents?