if (r != null)
gn.setBackgroundEnable(r);
if (l != null) {
// Remove event listeners
NodeEventTarget target = l.target;
target.removeEventListenerNS
(XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMAttrModified",
l, true);
target.removeEventListenerNS
(XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMNodeInserted",
l, true);
target.removeEventListenerNS
(XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMNodeRemoved",
l, true);
target.removeEventListenerNS
(XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMCharacterDataModified",
l, true);
l = null;
}
///////////////////////////////////////////////////////////////////////
// Handle mutations on content referenced in the same file if
// we are in a dynamic context.
if (isLocal && ctx.isDynamic()) {
l = new ReferencedElementMutationListener();
NodeEventTarget target = (NodeEventTarget)refElement;
l.target = target;
target.addEventListenerNS
(XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMAttrModified",
l, true, null);
theCtx.storeEventListenerNS
(target, XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMAttrModified",
l, true);
target.addEventListenerNS
(XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMNodeInserted",
l, true, null);
theCtx.storeEventListenerNS
(target, XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMNodeInserted",
l, true);
target.addEventListenerNS
(XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMNodeRemoved",
l, true, null);
theCtx.storeEventListenerNS
(target, XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMNodeRemoved",
l, true);
target.addEventListenerNS
(XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMCharacterDataModified",
l, true, null);
theCtx.storeEventListenerNS
(target, XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMCharacterDataModified",
l, true);