Skip to content

xml.dom.minidom uses names from superseded drafts of DOM Level 3 #156667

Description

@serhiy-storchaka

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dirtopic-XML

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions