/** * NON-DOM: Access the collection of ElementDefinitions. * @see ElementDefinitionImpl */ public NamedNodeMap getElements() { if (needsSyncChildren()) { synchronizeChildren(); } return elements; }
/** * Access the collection of Notations defined in the DTD. A * notation declares, by name, the format of an XML unparsed entity * or is used to formally declare a Processing Instruction target. */ public NamedNodeMap getNotations() { if (needsSyncChildren()) { synchronizeChildren(); } return notations; }
/** * Access the collection of general Entities, both external and * internal, defined in the DTD. For example, in: * <p> * <pre> * <!doctype example SYSTEM "ex.dtd" [ * <!ENTITY foo "foo"> * <!ENTITY bar "bar"> * <!ENTITY % baz "baz"> * ]> * </pre> * <p> * The Entities map includes foo and bar, but not baz. It is promised that * only Nodes which are Entities will exist in this NamedNodeMap. * <p> * For HTML, this will always be null. * <p> * Note that "built in" entities such as & and < should be * converted to their actual characters before being placed in the DOM's * contained text, and should be converted back when the DOM is rendered * as XML or HTML, and hence DO NOT appear here. */ public NamedNodeMap getEntities() { if (needsSyncChildren()) { synchronizeChildren(); } return entities; }
/** * NON-DOM: Subclassed to flip the entities' and notations' readonly switch * as well. * @see NodeImpl#setReadOnly */ public void setReadOnly(boolean readOnly, boolean deep) { if (needsSyncChildren()) { synchronizeChildren(); } super.setReadOnly(readOnly, deep); // set read-only property elements.setReadOnly(readOnly, true); entities.setReadOnly(readOnly, true); notations.setReadOnly(readOnly, true); } // setReadOnly(boolean,boolean)