Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xml.dom.minidom incorrectly claims DOM Level 3 conformance #50348

Closed
phihag mannequin opened this issue May 24, 2009 · 5 comments
Closed

xml.dom.minidom incorrectly claims DOM Level 3 conformance #50348

phihag mannequin opened this issue May 24, 2009 · 5 comments
Labels
topic-XML type-bug An unexpected behavior, bug, or error

Comments

@phihag
Copy link
Mannequin

phihag mannequin commented May 24, 2009

BPO 6098
Nosy @birkenfeld, @karlcow
Files
  • minidom-dont-declare-level3.diff: Patch removing the declarations
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2010-10-15.18:02:39.730>
    created_at = <Date 2009-05-24.20:42:59.233>
    labels = ['expert-XML', 'type-bug']
    title = 'xml.dom.minidom incorrectly claims DOM Level 3 conformance'
    updated_at = <Date 2010-10-15.18:02:39.728>
    user = 'https://bugs.python.org/phihag'

    bugs.python.org fields:

    activity = <Date 2010-10-15.18:02:39.728>
    actor = 'georg.brandl'
    assignee = 'none'
    closed = True
    closed_date = <Date 2010-10-15.18:02:39.730>
    closer = 'georg.brandl'
    components = ['XML']
    creation = <Date 2009-05-24.20:42:59.233>
    creator = 'phihag'
    dependencies = []
    files = ['14058']
    hgrepos = []
    issue_num = 6098
    keywords = ['patch']
    message_count = 5.0
    messages = ['88282', '88284', '111538', '118714', '118815']
    nosy_count = 4.0
    nosy_names = ['georg.brandl', 'phihag', 'karlcow', 'BreamoreBoy']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue6098'
    versions = ['Python 3.1', 'Python 2.7', 'Python 3.2']

    @phihag
    Copy link
    Mannequin Author

    phihag mannequin commented May 24, 2009

    From DOM Level 3[1]: "An implementation conforms to a DOM Level 3 module
    if it supports all the interfaces for that module and the associated
    semantics.". minidom supports only some Level 3 functions such as
    Node.renameNode, Element.setIdAttribute*, Text.replaceWholeText and
    Node.isSameNode.

    Apart from full DOM Level 2 conformance such as functional namespace
    handling, many semantics are available under a different name, such as
    DOMImplementation.getFeature (minidom: getInterface),
    Text.getWholeText(minidom: _getWholeText) or missing
    (Attr.schemaTypeInfo, Document.inputEncoding, Document.xmlEncoding,
    Document.xmlStandalone, Document.xmlVersion, Document.domConfig,
    Document.adoptNode, Document.normalizeDocument,
    DOMException.VALIDATION_ERR, DOMException.TYPE_MISMATCH_ERR,
    Node.baseURI, Node.textContent, Node.compareDocumentPosition,
    Node.lookupPrefix, Node.isDefaultNamespace, Node.lookupNamespaceURI,
    Node.isEqualNode, Node.DOCUMENT_POSITION_*,
    Text.isElementContentWhitespace).

    Users explicitely asking for DOM Level 3 conformance will run into
    unexpected problems. Attached is a patch that removes the DOM L3
    conformance declarations.

    @phihag phihag mannequin added topic-XML type-bug An unexpected behavior, bug, or error labels May 24, 2009
    @phihag
    Copy link
    Mannequin Author

    phihag mannequin commented May 24, 2009

    @BreamoreBoy
    Copy link
    Mannequin

    BreamoreBoy mannequin commented Jul 25, 2010

    Could someone with minidom experience please comment on this, thanks.

    @karlcow
    Copy link
    Mannequin

    karlcow mannequin commented Oct 14, 2010

    The source of 3.1/lib/python3.1/xml/dom/init.py is correct

    ===========
    minidom -- A simple implementation of the Level 1 DOM with namespace
    support added (based on the Level 2 specification) and other
    minor Level 2 functionality.
    ===========

    Even the level 2 implementation is partial. Some of the Level 3 implementation are based on a 9 April 2002 Working Draft. Comments like these ones are into the code.

    # Node interfaces from Level 3 (WD 9 April 2002)

    To note that there will be a need for a big code change in xml.dom to implement in the future webdomcore. Maybe a xml.dom.webdomcore would be welcome. http://www.w3.org/TR/domcore/

    The request is valid.

    @birkenfeld
    Copy link
    Member

    Applied in r85547.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    topic-XML type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant