org.apache.xerces.dom
public class DocumentTypeImpl extends ParentNode implements DocumentType
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.
Since: PR-DOM-Level-1-19980818.
Version: $Id: DocumentTypeImpl.java,v 1.29 2005/05/02 22:02:22 mrglavas Exp $
UNKNOWN:
Field Summary | |
---|---|
protected NamedNodeMapImpl | elements Elements. |
protected NamedNodeMapImpl | entities Entities. |
protected String | internalSubset |
protected String | name Document type name. |
protected NamedNodeMapImpl | notations Notations. |
protected String | publicID |
protected String | systemID |
Constructor Summary | |
---|---|
DocumentTypeImpl(CoreDocumentImpl ownerDocument, String name) Factory method for creating a document type node. | |
DocumentTypeImpl(CoreDocumentImpl ownerDocument, String qualifiedName, String publicID, String systemID) Factory method for creating a document type node. |
Method Summary | |
---|---|
Node | cloneNode(boolean deep) Clones the node. |
NamedNodeMap | getElements()
NON-DOM: Access the collection of ElementDefinitions. |
NamedNodeMap | getEntities()
Access the collection of general Entities, both external and
internal, defined in the DTD. |
String | getInternalSubset()
Introduced in DOM Level 2. |
String | getName()
Name of this document type. |
String | getNodeName()
Returns the document type name |
protected int | getNodeNumber() NON-DOM
Get the number associated with this doctype. |
short | getNodeType()
A short integer indicating what type of node this is. |
NamedNodeMap | getNotations()
Access the collection of Notations defined in the DTD. |
String | getPublicId()
Introduced in DOM Level 2. |
String | getSystemId()
Introduced in DOM Level 2. |
String | getTextContent() |
Object | getUserData(String key) |
protected Hashtable | getUserDataRecord() |
boolean | isEqualNode(Node arg)
DOM Level 3 WD- Experimental.
|
void | setInternalSubset(String internalSubset)
NON-DOM. |
void | setReadOnly(boolean readOnly, boolean deep)
NON-DOM: Subclassed to flip the entities' and notations' readonly switch
as well. |
void | setTextContent(String textContent) |
Object | setUserData(String key, Object data, UserDataHandler handler) |
See Also: ElementDefinitionImpl
<!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.
Return the internalSubset given as a string.
Since: WD-DOM-Level-2-19990923
Return the public identifier of this Document type.
Since: WD-DOM-Level-2-19990923
Return the system identifier of this Document type.
Since: WD-DOM-Level-2-19990923
Set the internalSubset given as a string.
See Also: NodeImpl