|
XML for Java 2.0.13 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.xml.dom.NodeImpl | +--com.ibm.xml.dom.DocumentTypeImpl
This class represents a Document Type declaraction in the document itself, not a Document Type Definition (DTD). An XML document may (or may not) have such a reference.
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.
Field Summary | |
protected NamedNodeMapImpl |
elements
Elements. |
protected NamedNodeMapImpl |
entities
Entities. |
protected NamedNodeMapImpl |
notations
Notations. |
Fields inherited from class com.ibm.xml.dom.NodeImpl |
ELEMENT_DEFINITION_NODE,
firstChild,
kidOK,
lastChild,
name,
nextSibling,
ownerDocument,
parentNode,
previousSibling,
readOnly,
syncChildren,
syncData,
userData,
value |
Constructor Summary | |
DocumentTypeImpl(DocumentImpl ownerDocument,
java.lang.String name)
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. |
java.lang.String |
getName()
Name of this document type. |
short |
getNodeType()
A short integer indicating what type of node this is. |
NamedNodeMap |
getNotations()
Access the collection of Notations defined in the DTD. |
void |
setNodeValue(java.lang.String value)
DocumentTypes never have a nodeValue. |
void |
setReadOnly(boolean readOnly,
boolean deep)
NON-DOM: Subclassed to flip the entities' and notations' readonly switch as well. |
Methods inherited from class com.ibm.xml.dom.NodeImpl |
appendChild,
changed,
getAttributes,
getChildNodes,
getFirstChild,
getLastChild,
getLength,
getNextSibling,
getNodeName,
getNodeValue,
getOwnerDocument,
getParentNode,
getPreviousSibling,
getReadOnly,
getUserData,
hasChildNodes,
insertBefore,
isKidOK,
item,
removeChild,
replaceChild,
setUserData,
synchronizeChildren,
synchronizeData,
toString |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected NamedNodeMapImpl entities
protected NamedNodeMapImpl notations
protected NamedNodeMapImpl elements
Constructor Detail |
public DocumentTypeImpl(DocumentImpl ownerDocument, java.lang.String name)
Method Detail |
public short getNodeType()
public void setNodeValue(java.lang.String value) throws DOMException
public Node cloneNode(boolean deep)
public java.lang.String getName()
public NamedNodeMap getEntities()
<!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.
public NamedNodeMap getNotations()
public void setReadOnly(boolean readOnly, boolean deep)
NodeImpl.setReadOnly
public NamedNodeMap getElements()
ElementDefinitionImpl
|
XML for Java 2.0.13 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |