Summary
  User-data handlers on attributes fail to fire when deep cloning an element.

(I think this is the right mailing-list for these sorts of things, if not then 
please direct me to where I want to be :)

I have attached a py.test-style test case (ie: code that only falls over in the 
presence of the bug).
I have attached a 2 line patch that fixes the bug.

To whoever is in charge of mindom.py, please review and commit :)
--anjansamanta

Attachment: test_minidom.py
Description: application/python

--- minidom-1.90.py	2006-09-26 00:40:51.861071000 +0100
+++ minidom.py	2006-09-26 00:58:45.080917336 +0100
@@ -1824,6 +1824,8 @@
             clone.setAttributeNS(attr.namespaceURI, attr.nodeName, attr.value)
             a = clone.getAttributeNodeNS(attr.namespaceURI, attr.localName)
             a.specified = attr.specified
+            if hasattr(attr, '_call_user_data_handler'):
+                attr._call_user_data_handler(operation, attr, a)
 
         if deep:
             for child in node.childNodes:
_______________________________________________
XML-SIG maillist  -  XML-SIG@python.org
http://mail.python.org/mailman/listinfo/xml-sig

Reply via email to