/** * Get an ID attribute. */ protected Attr getIdAttribute() { NamedNodeMap nnm = getAttributes(); if ( nnm == null ) { return null; } int len = nnm.getLength(); for (int i = 0; i < len; i++) { AbstractAttr a = (AbstractAttr)nnm.item(i); if (a.isId()) { return a; } } return null; }
/** * Get an ID attribute. */ protected Attr getIdAttribute() { NamedNodeMap nnm = getAttributes(); if ( nnm == null ) { return null; } int len = nnm.getLength(); for (int i = 0; i < len; i++) { AbstractAttr a = (AbstractAttr)nnm.item(i); if (a.isId()) { return a; } } return null; }
/** * Get an ID attribute. */ protected Attr getIdAttribute() { NamedNodeMap nnm = getAttributes(); if ( nnm == null ) { return null; } int len = nnm.getLength(); for (int i = 0; i < len; i++) { AbstractAttr a = (AbstractAttr)nnm.item(i); if (a.isId()) { return a; } } return null; }
if (!a.getSpecified()) continue; AbstractAttr aa = (AbstractAttr)importNode(a, true); if (trimId && aa.isId()) aa.setIsId(false); // don't consider this an Id. e.setAttributeNodeNS(aa);
switch (change) { case MutationEvent.ADDITION: if (((AbstractAttr)node).isId()) ownerDocument.addIdEntry(this, newv); attrAdded(node, newv); if (((AbstractAttr)node).isId()) ownerDocument.updateIdEntry(this, oldv, newv); attrModified(node, oldv, newv); if (((AbstractAttr)node).isId()) ownerDocument.removeIdEntry(this, oldv); attrRemoved(node, oldv);
switch (change) { case MutationEvent.ADDITION: if (((AbstractAttr)node).isId()) ownerDocument.addIdEntry(this, newv); attrAdded(node, newv); if (((AbstractAttr)node).isId()) ownerDocument.updateIdEntry(this, oldv, newv); attrModified(node, oldv, newv); if (((AbstractAttr)node).isId()) ownerDocument.removeIdEntry(this, oldv); attrRemoved(node, oldv);
if (!a.getSpecified()) continue; AbstractAttr aa = (AbstractAttr)importNode(a, true); if (trimId && aa.isId()) aa.setIsId(false); // don't consider this an Id. e.setAttributeNodeNS(aa);
if (!a.getSpecified()) continue; AbstractAttr aa = (AbstractAttr)importNode(a, true); if (trimId && aa.isId()) aa.setIsId(false); // don't consider this an Id. e.setAttributeNodeNS(aa);