/** Setup the default attributes. */ protected void setupDefaultAttributes() { NamedNodeMapImpl defaults = getDefaultAttributes(); if (defaults != null) { attributes = new AttributeMap(this, defaults); } }
/** * Retrieve all the Attributes as a set. Note that this API is inherited * from Node rather than specified on Element; in fact only Elements will * ever have Attributes, but they want to allow folks to "blindly" operate * on the tree as a set of Nodes. */ public NamedNodeMap getAttributes() { if (needsSyncData()) { synchronizeData(); } if (attributes == null) { attributes = new AttributeMap(this, null); } return attributes; } // getAttributes():NamedNodeMap
/** * Cloning a NamedNodeMap is a DEEP OPERATION; it always clones * all the nodes contained in the map. */ public NamedNodeMapImpl cloneMap(NodeImpl ownerNode) { AttributeMap newmap = new AttributeMap((ElementImpl) ownerNode, null); newmap.hasDefaults(hasDefaults()); newmap.cloneContent(this); return newmap; } // cloneMap():AttributeMap
/** * NON-DOM: sets attribute node for this element */ protected int setXercesAttributeNode (Attr attr){ if (needsSyncData()) { synchronizeData(); } if (attributes == null) { attributes = new AttributeMap(this, null); } return attributes.addItem(attr); }
void moveSpecifiedAttributes(ElementImpl el) { if (needsSyncData()) { synchronizeData(); } if (el.hasAttributes()) { if (attributes == null) { attributes = new AttributeMap(this, null); } attributes.moveSpecifiedAttributes(el.attributes); } }
qualifiedName); if (attributes == null) { attributes = new AttributeMap(this, null);
attributes = new AttributeMap(this, null);
attributes = new AttributeMap(this, null);
attributes = new AttributeMap(this, null);