DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27452>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27452 UserDataHandler does not receive event when existing node is renamed Summary: UserDataHandler does not receive event when existing node is renamed Product: Xerces2-J Version: 2.6.2 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: DOM AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The user data handler should receive an event for rename node each time a node which has user data is renamed, regardless if rename creates a new node or just renames the existing one [1]. Currently failing DOM L3 Core test case userdatahandler01 because a user data NODE_RENAMED event is not being fired if renaming a node simply changes the name of the given node. A user data event is currently fired however if renameNode creates a new node. [1] http://www.w3.org/TR/2004/PR-DOM-Level-3-Core 20040205/core.html#UserDataHandler Proposed patch in CoreDocumentImpl.renameNode : --- CoreDocumentImpl.java 2004-03-04 14:38:37.00 -0500 1.68 +++ CoreDocumentImpl.java 2004-03-04 14:37:16.00 -0500 @@ -890,6 +890,10 @@ ElementImpl el = (ElementImpl) n; if (el instanceof ElementNSImpl) { ((ElementNSImpl) el).rename(namespaceURI, name); + // and fire user data NODE_RENAMED event + callUserDataHandlers(el, null, + UserDataHandler.NODE_RENAMED); } else { if (namespaceURI == null) { @@ -910,6 +914,10 @@ msg); } el.rename(name); + // and fire user data NODE_RENAMED event + callUserDataHandlers(el, null, + UserDataHandler.NODE_RENAMED); } else { // we need to create a new object @@ -966,18 +974,28 @@ } if (n instanceof AttrNSImpl) { ((AttrNSImpl) at).rename(namespaceURI, name); // reattach attr to element if (el != null) { el.setAttributeNodeNS(at); } + + // and fire user data NODE_RENAMED event + callUserDataHandlers(at, null, + UserDataHandler.NODE_RENAMED); } else { if (namespaceURI == null) { at.rename(name); // reattach attr to element if (el != null) { el.setAttributeNode(at); } + // and fire user data NODE_RENAMED event + callUserDataHandlers(at, null, + UserDataHandler.NODE_RENAMED); } else { // we need to create a new object --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
