DocumentType is an Extended DOM feature, used in XML documents but not in HTML.
Note that Entities and Notations are no longer children of the DocumentType, but are parentless nodes hung only in their appropriate NamedNodeMaps.
This area is UNDERSPECIFIED IN REC-DOM-Level-1-19981001 Most notably, absolutely no provision was made for storing and using Element and Attribute information. Nor was the linkage between Entities and Entity References nailed down solidly.
| Modifier and Type | Field and Description |
|---|---|
| private int | doctypeNumber
The following are required for compareDocumentPosition |
| protected NamedNodeMapImpl | elements
Elements. |
| protected NamedNodeMapImpl | entities
Entities. |
| protected String | |
| protected String | name
Document type name. |
| protected NamedNodeMapImpl | notations
Notations. |
| protected String | |
| private static final ObjectStreamField[] | |
| pack-priv static final long | serialVersionUID
Hides com. |
| protected String | |
| private Map |
| Access | Constructor and Description |
|---|---|
| public | DocumentTypeImpl(CoreDocumentImpl ownerDocument, String name)
Factory method for creating a document type node. |
| public | DocumentTypeImpl(CoreDocumentImpl ownerDocument, String qualifiedName, String publicID, String systemID)
Factory method for creating a document type node. |
| doctypeNumber | back to summary |
|---|---|
| private int doctypeNumber The following are required for compareDocumentPosition | |
| elements | back to summary |
|---|---|
| protected NamedNodeMapImpl elements Elements. | |
| entities | back to summary |
|---|---|
| protected NamedNodeMapImpl entities Entities. | |
| internalSubset | back to summary |
|---|---|
| protected String internalSubset | |
| name | back to summary |
|---|---|
| protected String name Document type name. | |
| notations | back to summary |
|---|---|
| protected NamedNodeMapImpl notations Notations. | |
| publicID | back to summary |
|---|---|
| protected String publicID | |
| serialPersistentFields | back to summary |
|---|---|
private static final ObjectStreamField[] serialPersistentFields
| |
| serialVersionUID | back to summary |
|---|---|
| pack-priv static final long serialVersionUID Hides com. Serialization version. | |
| systemID | back to summary |
|---|---|
| protected String systemID | |
| userData | back to summary |
|---|---|
| private Map<String, ParentNode. | |
| DocumentTypeImpl | back to summary |
|---|---|
| public DocumentTypeImpl(CoreDocumentImpl ownerDocument, String name) Factory method for creating a document type node. | |
| DocumentTypeImpl | back to summary |
|---|---|
| public DocumentTypeImpl(CoreDocumentImpl ownerDocument, String qualifiedName, String publicID, String systemID) Factory method for creating a document type node. | |
| cloneNode | back to summary |
|---|---|
| public Node cloneNode(boolean deep) Overrides com. Implements org. Clones the node. | |
| getElements | back to summary |
|---|---|
| public NamedNodeMap getElements() NON-DOM: Access the collection of ElementDefinitions.
| |
| getEntities | back to summary |
|---|---|
| public NamedNodeMap getEntities() Implements org. Access the collection of general Entities, both external and internal, defined in the DTD. For example, in:
<!doctype example SYSTEM "ex.dtd" [
<!ENTITY foo "foo">
<!ENTITY bar "bar">
<!ENTITY % baz "baz">
]>
The Entities map includes foo and bar, but not baz. It is promised that only Nodes which are Entities will exist in this NamedNodeMap. For HTML, this will always be null. 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. | |
| getInternalSubset | back to summary |
|---|---|
| public String getInternalSubset() Implements org. Introduced in DOM Level 2. Return the internalSubset given as a string.
| |
| getName | back to summary |
|---|---|
| public String getName() Implements org. Name of this document type. If we loaded from a DTD, this should be the name immediately following the DOCTYPE keyword. | |
| getNodeName | back to summary |
|---|---|
| public String getNodeName() Implements abstract com. Implements org. Returns the document type name | |
| getNodeNumber | back to summary |
|---|---|
| protected int getNodeNumber() Overrides com. NON-DOM Get the number associated with this doctype. | |
| getNodeType | back to summary |
|---|---|
| public short getNodeType() Implements abstract com. Implements org. A short integer indicating what type of node this is. The named constants for this value are defined in the org.w3c.dom.Node interface. | |
| getNotations | back to summary |
|---|---|
| public NamedNodeMap getNotations() Implements org. 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. | |
| getPublicId | back to summary |
|---|---|
| public String getPublicId() Implements org. Introduced in DOM Level 2. Return the public identifier of this Document type.
| |
| getSystemId | back to summary |
|---|---|
| public String getSystemId() Implements org. Introduced in DOM Level 2. Return the system identifier of this Document type.
| |
| getTextContent | back to summary | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| public String getTextContent() throws DOMException Overrides com. Implements org. Doc from org. This attribute returns the text content of this node and its
descendants. When it is defined to be
| |||||||||
| getUserData | back to summary |
|---|---|
| public Object getUserData(String key) Overrides com. Implements org. Doc from org. Retrieves the object associated to a key on a this node. The object
must first have been set to this node by calling
| |
| getUserDataRecord | back to summary |
|---|---|
| protected Map Overrides com.
| |
| isEqualNode | back to summary |
|---|---|
| public boolean isEqualNode(Node arg) Overrides com. Implements org. DOM Level 3 WD- Experimental. Override inherited behavior from ParentNodeImpl to support deep equal. | |
| readObject | back to summary |
|---|---|
| private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException Hides com. Doc from com. Deserialize object.
| |
| setInternalSubset | back to summary |
|---|---|
| public void setInternalSubset(String internalSubset) NON-DOM. Set the internalSubset given as a string. | |
| setOwnerDocument | back to summary |
|---|---|
| protected void setOwnerDocument(CoreDocumentImpl doc) Overrides com. NON-DOM set the ownerDocument of this node and its children | |
| setReadOnly | back to summary |
|---|---|
| public void setReadOnly(boolean readOnly, boolean deep) Overrides com. NON-DOM: Subclassed to flip the entities' and notations' readonly switch as well.
| |
| setTextContent | back to summary | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| public void setTextContent(String textContent) throws DOMException Overrides com. Implements org. Doc from org. This attribute returns the text content of this node and its
descendants. When it is defined to be
| |||||||||
| setUserData | back to summary |
|---|---|
| public Object setUserData(String key, Object data, UserDataHandler handler) Overrides com. Implements org. Doc from org. Associate an object to a key on this node. The object can later be
retrieved from this node by calling | |
| writeObject | back to summary |
|---|---|
| private void writeObject(ObjectOutputStream out) throws IOException Hides com. Doc from com. Serialize object.
| |