You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by ji...@apache.org on 2004/04/23 19:46:53 UTC
[jira] Closed: (XERCESJ-910) UserDataHandler does not receive event when existing node is renamed
Message:
The following issue has been closed.
Resolver: Michael Glavassevich
Date: Fri, 23 Apr 2004 10:46 AM
Closed as per state in Bugzilla.
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/XERCESJ-910
Here is an overview of the issue:
---------------------------------------------------------------------
Key: XERCESJ-910
Summary: UserDataHandler does not receive event when existing node is renamed
Type: Bug
Status: Closed
Resolution: FIXED
Project: Xerces2-J
Components:
DOM
Versions:
2.6.2
Assignee: Michael Glavassevich
Reporter: Naela Nissar
Created: Thu, 4 Mar 2004 7:45 PM
Updated: Fri, 23 Apr 2004 10:46 AM
Environment: Operating System: Other
Platform: Other
Description:
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
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org