Several public attributes and methods of xml.dom.minidom come from working drafts of DOM Level 3, and were renamed before the Recommendation was published in 2004. The code says so itself:
# DOM Level 3 attributes, based on the 22 Oct 2002 draft
# DOM Level 3 (WD 9 April 2002)
| minidom |
DOM Level 3 Core |
Node.getInterface(), DOMImplementation.getInterface() |
getFeature() |
Attr.schemaType, Element.schemaType |
schemaTypeInfo |
Text.isWhitespaceInElementContent |
isElementContentWhitespace |
Document.actualEncoding |
inputEncoding |
Document.encoding |
xmlEncoding |
Document.version |
xmlVersion |
Document.standalone |
xmlStandalone |
Entity.actualEncoding, Entity.encoding, Entity.version |
the same three renames |
Document.errorHandler is from the same drafts; in the Recommendation it became a parameter of domConfig.
None of these names are documented, so nothing tells a user that they are neither DOM Level 1/2 (which xml.dom documents) nor DOM Level 3 (which minidom does not claim, see gh-50348).
Adding the specified names and keeping the old ones as aliases breaks nothing, and lets the documented API match the specification.
Several public attributes and methods of
xml.dom.minidomcome from working drafts of DOM Level 3, and were renamed before the Recommendation was published in 2004. The code says so itself:Node.getInterface(),DOMImplementation.getInterface()getFeature()Attr.schemaType,Element.schemaTypeschemaTypeInfoText.isWhitespaceInElementContentisElementContentWhitespaceDocument.actualEncodinginputEncodingDocument.encodingxmlEncodingDocument.versionxmlVersionDocument.standalonexmlStandaloneEntity.actualEncoding,Entity.encoding,Entity.versionDocument.errorHandleris from the same drafts; in the Recommendation it became a parameter ofdomConfig.None of these names are documented, so nothing tells a user that they are neither DOM Level 1/2 (which
xml.domdocuments) nor DOM Level 3 (which minidom does not claim, see gh-50348).Adding the specified names and keeping the old ones as aliases breaks nothing, and lets the documented API match the specification.