Hi, Arnaud. You are right. I was not aware that during runtime a DocumentImpl instance is used instead of CoreDocumentImpl. The methods in DocumentImpl (Xerces 1.4.4) are not empty.
Debugging these methods, I see that at DocumentImpl line 1048 that the MutationEvent created has a null value as target, whereas the DOM level 2 Events specification v1.0 says in section 1.6.4: "The target of this event is the CharacterData node". Well, maybe that value is set afterwards. I did not understand all functionality in the code called afterwards. Finally I tried to register a non-capturing event-listener as well by adding this line to my code: ((org.w3c.dom.events.EventTarget)n).addEventListener(org.apache.xerces.dom.e vents.MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED, this, false); .....and got the event! But again the target of the event is the DeferredDocumentImpl (where I attached my event listener) and not the text node that was changed. - Why is the target wrong? - Why do I have to use a non-capturing event listener to get this event, while I am able to receive all others with capturing ones? Hiran > -----Urspr�ngliche Nachricht----- > Von: Arnaud Le Hors [mailto:[EMAIL PROTECTED]] > Gesendet: Dienstag, 8. Januar 2002 18:15 > An: [EMAIL PROTECTED] > Betreff: Re: No DOM MutationEvents for changes of text data > > > Software AG wrote: > > > > I have looked at the 1.4.4 code, where CharacterDataImpl calls > > CoreDocumentImpl.modifyingCharacterData(), > > CoreDocumentImpl.modifiedCharacterData() and > > CoreDocumentImpl.replacedText(). But all of these methods are empty. > > To make sure I'm in the latest code this time, I also > looked at the 2.0.0b4 > > code, which looks exactly the same (for these three methods)! > > > > In the docs it is stated that DOM events are fully > implemented, so I think I > > should raise a bug report. > > You're not looking at the right class. These methods are overloaded in > the subclass DocumentImpl. This is not to say there is no bug, > unfortunately. :-) > If you can investigate and try to figure where the pb you're seeing > comes from that'd be very helpful. > Thanks. > -- > Arnaud Le Hors - IBM, XML Standards Strategy Group / W3C AC Rep. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
