null != (entities = doctype.getEntities())) { entDef = (EntityImpl)entities.getNamedItem(getNodeName()); if (entDef !=null) { return entDef.getBaseURI();
/** * EntityReference's children are a reflection of those defined in the * named Entity. This method creates them if they haven't been created yet. * This doesn't support editing the Entity though, since this only called * once for all. */ protected void synchronizeChildren() { // no need to synchronize again needsSyncChildren(false); DocumentType doctype; NamedNodeMap entities; EntityImpl entDef; if (null != (doctype = getOwnerDocument().getDoctype()) && null != (entities = doctype.getEntities())) { entDef = (EntityImpl)entities.getNamedItem(getNodeName()); // No Entity by this name, stop here. if (entDef == null) return; // If entity's definition exists, clone its kids isReadOnly(false); for (Node defkid = entDef.getFirstChild(); defkid != null; defkid = defkid.getNextSibling()) { Node newkid = defkid.cloneNode(true); insertBefore(newkid, null); } setReadOnly(true, true); } }