[Patches] [Patch #103885] Dynamic registration and lookup of DOM implementations

noreply@sourceforge.net noreply@sourceforge.net
Thu, 22 Feb 2001 06:06:29 -0800


Patch #103885 has been updated. 

Project: python
Category: XML
Status: Closed
Submitted by: loewis
Assigned to : nobody
Summary: Dynamic registration and lookup of DOM implementations

Follow-Ups:

Date: 2001-Feb-22 06:06
By: loewis

Comment:
Committed as minidom 1.27, __init__  1.9, domreg 1.1 and xmldom.tex 1.10.
-------------------------------------------------------

Date: 2001-Feb-20 10:12
By: fdrake

Comment:
Let's go with it.
-------------------------------------------------------

Date: 2001-Feb-20 09:58
By: loewis

Comment:
Updated the patch to address Fred's comments. Returning the same
implementation object every time is not a strict requirement, as discussion
on xml-sig concluded: there are cases where returning a fresh object every
time is desirable. E.g. it might be desirable to switch off event
propagation for an implementation if the application does not use that
feature. Then, only the specific implementation instance should be
affected.
-------------------------------------------------------

Date: 2001-Feb-19 14:50
By: fdrake

Comment:
Just about, I think.

xml.dom.minidom should define getDOMImplementaion() this way:

def getDOMImplementation():
    return Document.implementation

(There's no need to create new instances of a data-less object.)

The search loop at the end of domreg.getDOMImplementation() should only do
the _good_enough()/return test in an "else" clause of the try/except,
otherwise it can test the same implementation objects more than once.

The documentation should indicate that each DOM implementation should
provide a getDOMImplementation() that returns the same object each time
wherever possible.

Which points out the need for documentation, but I can convert the
docstrings myself for this one.

Assign back to me for review after making changes.
-------------------------------------------------------

-------------------------------------------------------
For more info, visit:

http://sourceforge.net/patch/?func=detailpatch&patch_id=103885&group_id=5470