/** * Attribute has no public constructor. Please use the factory * method in the Document class. */ protected AttrImpl(CoreDocumentImpl ownerDocument, String name) { super(ownerDocument); this.name = name; /** False for default attributes. */ isSpecified(true); hasStringValue(true); }
/** NON-DOM, for use by parser */ public void setSpecified(boolean arg) { if (needsSyncData()) { synchronizeData(); } isSpecified(arg); } // setSpecified(boolean)
/** * The "specified" flag is true if and only if this attribute's * value was explicitly specified in the original document. Note that * the implementation, not the user, is in charge of this * property. If the user asserts an Attribute value (even if it ends * up having the same value as the default), it is considered a * specified attribute. If you really want to revert to the default, * delete the attribute from the Element, and the Implementation will * re-assert the default (if any) in its place, with the appropriate * specified=false setting. */ public boolean getSpecified() { if (needsSyncData()) { synchronizeData(); } return isSpecified(); } // getSpecified():boolean
/** * Move specified attributes from the given map to this one */ void moveSpecifiedAttributes(AttributeMap srcmap) { int nsize = (srcmap.nodes != null) ? srcmap.nodes.size() : 0; for (int i = nsize - 1; i >= 0; i--) { AttrImpl attr = (AttrImpl) srcmap.nodes.get(i); if (attr.isSpecified()) { srcmap.remove(attr, i, false); if (attr.getLocalName() != null) { setNamedItem(attr); } else { setNamedItemNS(attr); } } } } // moveSpecifiedAttributes(AttributeMap):void
for (int i = nsize - 1; i >= 0; --i) { AttrImpl attr = (AttrImpl) nodes.get(i); if (!attr.isSpecified()) { remove(attr, i, false);
public Node cloneNode(boolean deep) { if (needsSyncChildren()) { synchronizeChildren(); } AttrImpl clone = (AttrImpl) super.cloneNode(deep); // take care of case where there are kids if (!clone.hasStringValue()) { // Need to break the association w/ original kids clone.value = null; // Cloning an Attribute always clones its children, // since they represent its value, no matter whether this // is a deep clone or not for (Node child = (Node) value; child != null; child = child.getNextSibling()) { clone.appendChild(child.cloneNode(true)); } } clone.isSpecified(true); return clone; }
previous.isOwned(false); previous.isSpecified(true); } else {
previous.isOwned(false); previous.isSpecified(true); } else { i = -1 - i; // Insert point (may be end of list)
attr.isSpecified(true); attr.isIdAttribute(false);
attr.isSpecified(true); userData = node.getUserDataRecord();
isSpecified(true); if (ownerDocument.getMutationEvents()) {