defs = new TreeSet();
definitionLists.put(namespaceURI, localName, defs);
} else if (defs.size() > 0) {
oldDefRec = (DefinitionRecord) defs.first();
}
XBLOMTemplateElement template = null;
for (Node n = def.getFirstChild(); n != null; n = n.getNextSibling()) {
if (n instanceof XBLOMTemplateElement) {
template = (XBLOMTemplateElement) n;
break;
}
}
defRec = new DefinitionRecord(namespaceURI, localName, def,
template, imp);
defs.add(defRec);
definitions.put(def, imp, defRec);
addDefinitionElementListeners(def, ir);
if (defs.first() != defRec) {
return;
}
if (oldDefRec != null) {
XBLOMDefinitionElement oldDef = oldDefRec.definition;
XBLOMTemplateElement oldTemplate = oldDefRec.template;
if (oldTemplate != null) {
removeTemplateElementListeners(oldTemplate, ir);
}
removeDefinitionElementListeners(oldDef, ir);
}