The DOM specification for mutation events: http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html#Events-eventgroupings-mutationevents specifies that the DOMNodeRemovedFromDocument and DOMNodeInsertedIntoDocument mutation events, unlike the others, should NOT bubble. However, Batik is bubbling these events. Example of an event I received in a test program: event=org.apache.batik.dom.events.DOMMutationEvent@ff45de target=org.apache.batik.dom.svg.SVGOMSVGElement@6210fb currentTarget=org.apache.batik.dom.svg.SVGOMGElement@aa37a6 phase=3 bubbles=true type=DOMNodeRemovedFromDocument Note that the "target" is different from the "currentTarget" and that "bubbles=true". Both of these things should not happen for a non-bubbling event.
However, DOM Level 3 Events defines them to bubble: http://www.w3.org/TR/DOM-Level-3-Events/events.html#event-DOMNodeRemovedFromDocument Since the implementation is based on DOM 3 now, I think I'll leave it as bubbling.
Well I'll be darned. OK, nevermind then.
(In reply to comment #1) > However, DOM Level 3 Events defines them to bubble: > http://www.w3.org/TR/DOM-Level-3-Events/events.html#event-DOMNodeRemovedFromDocument > > Since the implementation is based on DOM 3 now, I think I'll leave it as bubbling. There seems to be an inconsistency in the DOM 3 events spec; the table of event types in section 1.5.1 http://www.w3.org/TR/DOM-Level-3-Events/events.html#Events-EventTypes-complete still lists DOMNodeRemovedFromDocument and DOMNodeInsertedIntoDocument as non-bubbling.
I think http://lists.w3.org/Archives/Public/public-webapi/2008Jan/0012.html this is an error in the specification. The definition was not meant to be changed from DOM Level 2, as far as I recall anyway.
OK, reopened. DOM Level 3 Events is being worked on again now, and DOM mutation events are being reworked AIUI. I'll leave this bug open until that reworking is done.