Element, AttributeList, ContentModel, Parser
| Modifier and Type | Field and Description |
|---|---|
| public final Element | applet
The element corresponding to applet. |
| public final Element | base
The element corresponding to base. |
| public final Element | body
The element corresponding to body. |
| private static final Hashtable | |
| public Hashtable | elementHash
The hash table contains the name of element and the corresponding element. |
| public Vector | elements
The vector of elements |
| public Hashtable | entityHash
The hash table contains an |
| public static final int | FILE_VERSION
The version of a file |
| public final Element | head
The element corresponding to head. |
| public final Element | html
The element corresponding to html. |
| public final Element | isindex
The element corresponding to isindex. |
| pack-priv final Element | |
| public final Element | meta
The element corresponding to meta. |
| public String | name
the name of the DTD |
| public final Element | p
The element corresponding to p. |
| public final Element | param
The element corresponding to param. |
| public final Element | pcdata
The element corresponding to pcdata. |
| pack-priv final Element | |
| pack-priv final Element | |
| public final Element | title
The element corresponding to title. |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected AttributeList | Returns: the newAttributeListthe attribute's name name, int the attribute's type type, int the attribute's modifier modifier, String the default value of the attribute value, String the allowed values for the attribute (multiple values could be separated by '|') values, AttributeList the previous attribute of the element; to be placed to atts)AttributeList.next,
creating a linked listCreates and returns an |
| protected ContentModel | Returns: the newContentModelthe type of the new content model type, Object the content of the content model obj, ContentModel pointer to the next content model next)Creates and returns a new content model. |
| protected Element | Returns: the newElementthe element's name name, int the element's type type, boolean true if the element needs no starting tagtrue if the element needs no closing tagthe element's content content, String[] the elements that must be excluded from the content of the element exclusions, String[] the elements that can be included as the content of the element inclusions, AttributeList the attributes of the element atts)Creates and returns an |
| public Entity | |
| protected Entity | |
| public void | defineAttributes(String
the name of the name, AttributeList Elementthe atts)AttributeList specifying the
ElementDefines attributes for an |
| public Element | Returns: theElement specifiedthe name of the name, int Elementthe type of the type, boolean Elementtrue if start should be omittedtrue if end should be omittedthe content, BitSet ContentModelthe set of elements that must not occur inside the element exclusions, BitSet the set of elements that can occur inside the element inclusions, AttributeList the atts)AttributeList specifying the
ElementReturns the |
| public Entity | Returns: theEntity requested or a new Entity
if not foundthe name of the name, int Entity as a Stringthe type of the type, char[] Entitythe data)Entity's dataDefines an entity. |
| pack-priv boolean | Returns: true if name exists as
part of the DTD, otherwise returns falsethe requested name)StringReturns |
| public static DTD | |
| public Element | Returns: theElement corresponding to
name, which may be newly createdthe requested name)StringGets an element by name. |
| public Element | Returns: theElement corresponding to
indexthe requested index index)Gets an element by index. |
| public Entity | |
| public Entity | Returns: theEntity corresponding to the
ch characterthe character ch)Gets a character entity. |
| public String | |
| public static void | putDTDHash(String
the name of the DTD name, DTD the DTD dtd)Put a name and appropriate DTD to hashtable. |
| public void | |
| private AttributeList | |
| private ContentModel | |
| private String[] | |
| public String | Returns: the string representation of this DTDOverrides java. Returns a string representation of this DTD. |
| applet | back to summary |
|---|---|
| public final Element applet The element corresponding to applet. | |
| base | back to summary |
|---|---|
| public final Element base The element corresponding to base. | |
| body | back to summary |
|---|---|
| public final Element body The element corresponding to body. | |
| DTD_MAP | back to summary |
|---|---|
| private static final Hashtable<String, DTD> DTD_MAP | |
| elementHash | back to summary |
|---|---|
| public Hashtable<String, Element> elementHash The hash table contains the name of element and the corresponding element. | |
| elements | back to summary |
|---|---|
| public Vector<Element> elements The vector of elements | |
| entityHash | back to summary |
|---|---|
| public Hashtable<Object, Entity> entityHash The hash table contains an | |
| FILE_VERSION | back to summary |
|---|---|
| public static final int FILE_VERSION The version of a file | |
| head | back to summary |
|---|---|
| public final Element head The element corresponding to head. | |
| html | back to summary |
|---|---|
| public final Element html The element corresponding to html. | |
| isindex | back to summary |
|---|---|
| public final Element isindex The element corresponding to isindex. | |
| link | back to summary |
|---|---|
| pack-priv final Element link | |
| meta | back to summary |
|---|---|
| public final Element meta The element corresponding to meta. | |
| name | back to summary |
|---|---|
| public String name the name of the DTD | |
| p | back to summary |
|---|---|
| public final Element p The element corresponding to p. | |
| param | back to summary |
|---|---|
| public final Element param The element corresponding to param. | |
| pcdata | back to summary |
|---|---|
| public final Element pcdata The element corresponding to pcdata. | |
| script | back to summary |
|---|---|
| pack-priv final Element script | |
| style | back to summary |
|---|---|
| pack-priv final Element style | |
| title | back to summary |
|---|---|
| public final Element title The element corresponding to title. | |
| DTD | back to summary |
|---|---|
| protected DTD(String name) Creates a new DTD with the specified name.
| |
| defAttributeList | back to summary |
|---|---|
| protected AttributeList defAttributeList(String name, int type, int modifier, String value, String values, AttributeList atts) Creates and returns an
| |
| defContentModel | back to summary |
|---|---|
| protected ContentModel defContentModel(int type, Object obj, ContentModel next) Creates and returns a new content model.
| |
| defElement | back to summary |
|---|---|
| protected Element defElement(String name, int type, boolean omitStart, boolean omitEnd, ContentModel content, String[] exclusions, String[] inclusions, AttributeList atts) Creates and returns an
| |
| defEntity | back to summary |
|---|---|
| public Entity defEntity(String name, int type, int ch) Creates and returns a character | |
| defEntity | back to summary |
|---|---|
| protected Entity defEntity(String name, int type, String str) Creates and returns an | |
| defineAttributes | back to summary |
|---|---|
| public void defineAttributes(String name, AttributeList atts) Defines attributes for an
| |
| defineElement | back to summary |
|---|---|
| public Element defineElement(String name, int type, boolean omitStart, boolean omitEnd, ContentModel content, BitSet exclusions, BitSet inclusions, AttributeList atts) Returns the
| |
| defineEntity | back to summary |
|---|---|
| public Entity defineEntity(String name, int type, char[] data) Defines an entity. If the | |
| elementExists | back to summary |
|---|---|
| pack-priv boolean elementExists(String name) Returns
| |
| getDTD | back to summary |
|---|---|
| public static DTD getDTD(String name) throws IOException Returns a DTD with the specified
| |
| getElement | back to summary |
|---|---|
| public Element getElement(String name) Gets an element by name. A new element is created if the element doesn't exist. | |
| getElement | back to summary |
|---|---|
| public Element getElement(int index) Gets an element by index.
| |
| getEntity | back to summary |
|---|---|
| public Entity getEntity(String name) Gets an entity by name. | |
| getEntity | back to summary |
|---|---|
| public Entity getEntity(int ch) Gets a character entity.
| |
| getName | back to summary |
|---|---|
| public String getName() Gets the name of the DTD.
| |
| putDTDHash | back to summary |
|---|---|
| public static void putDTDHash(String name, DTD dtd) Put a name and appropriate DTD to hashtable. | |
| read | back to summary |
|---|---|
| public void read(DataInputStream in) throws IOException Recreates a DTD from an archived format.
| |
| readAttributeList | back to summary |
|---|---|
| private AttributeList readAttributeList(DataInputStream in, String[] names) throws IOException | |
| readContentModel | back to summary |
|---|---|
| private ContentModel readContentModel(DataInputStream in, String[] names) throws IOException | |
| readNameArray | back to summary |
|---|---|
| private String[] readNameArray(DataInputStream in, String[] names) throws IOException | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string representation of this DTD.
| |