/** Factory constructor. */ public ElementDefinitionImpl(CoreDocumentImpl ownerDocument, String name) { super(ownerDocument); this.name = name; attributes = new NamedNodeMapImpl(ownerDocument); }
/** Factory method for creating a document type node. */ public DocumentTypeImpl(CoreDocumentImpl ownerDocument, String name) { super(ownerDocument); this.name = name; // DOM entities = new NamedNodeMapImpl(this); notations = new NamedNodeMapImpl(this); // NON-DOM elements = new NamedNodeMapImpl(this); } // <init>(CoreDocumentImpl,String)
/** * Cloning a NamedNodeMap is a DEEP OPERATION; it always clones * all the nodes contained in the map. */ public NamedNodeMapImpl cloneMap(NodeImpl ownerNode) { NamedNodeMapImpl newmap = new NamedNodeMapImpl(ownerNode); newmap.cloneContent(this); return newmap; }
(DeferredDocumentImpl)this.ownerDocument; entities = new NamedNodeMapImpl(this); notations = new NamedNodeMapImpl(this); elements = new NamedNodeMapImpl(this);
/** Synchronizes the default attribute values. */ protected void synchronizeChildren() { // we don't want to generate any event for this so turn them off boolean orig = ownerDocument.getMutationEvents(); ownerDocument.setMutationEvents(false); // attributes are now synced needsSyncChildren(false); // create attributes node map DeferredDocumentImpl ownerDocument = (DeferredDocumentImpl)this.ownerDocument; attributes = new NamedNodeMapImpl(ownerDocument); // Default attributes dangle as children of the element // definition "node" in the internal fast table. for (int nodeIndex = ownerDocument.getLastChild(fNodeIndex); nodeIndex != -1; nodeIndex = ownerDocument.getPrevSibling(nodeIndex)) { Node attr = ownerDocument.getNodeObject(nodeIndex); attributes.setNamedItem(attr); } // set mutation events flag back to its original value ownerDocument.setMutationEvents(orig); } // synchronizeChildren()