All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.xmlmiddleware.schemas.dtds.DTD

java.lang.Object
   |
   +----org.xmlmiddleware.schemas.dtds.DTD

public class DTD
extends Object
Class representing a DTD.

DTD and the classes it points to are designed to be read-only. While you can use them to create your own model of a DTD, you do so at your own risk. This is because DTD and the classes it points to use public class variables to hold information. The lack of mutator (set) methods means it is easy to construct an invalid DTD.

Version:
2.0
Author:
Ronald Bourret

Variable Index

 o elementTypes
A Hashtable of ElementTypes defined in the DTD.
 o notations
A Hashtable of Notations defined in the DTD.
 o parameterEntities
A Hashtable of ParameterEntities defined in the DTD.
 o parsedGeneralEntities
A Hashtable of ParsedGeneralEntities defined in the DTD.
 o unparsedEntities
A Hashtable of UnparsedEntities defined in the DTD.

Constructor Index

 o DTD()
Construct a new DTD.

Method Index

 o createElementType(String, String, String)
Create an ElementType by URI, local name, and prefix.
 o createElementType(XMLName)
Create an ElementType by XMLName.

Variables

 o elementTypes
 public Hashtable elementTypes
A Hashtable of ElementTypes defined in the DTD.

Keyed by the element type's XMLName.

 o notations
 public Hashtable notations
A Hashtable of Notations defined in the DTD.

Keyed by the notation's name.

 o parameterEntities
 public Hashtable parameterEntities
A Hashtable of ParameterEntities defined in the DTD.

Keyed by the entity's name.

WARNING! The ParameterEntity objects in this Hashtable are used during parsing. After parsing, this Hashtable and the ParameterEntity objects it contains are not guaranteed to contain useful information. In particular, ParameterEntity objects cannot be used to reconstruct a DTD and are not reference from where they were used, such as in content models. This is because DTD and its related classes are designed to be used by applications that want to explore the "logical" structure of a DTD -- that is, its element types, attributes, and notations -- rather than its physical structure.

 o parsedGeneralEntities
 public Hashtable parsedGeneralEntities
A Hashtable of ParsedGeneralEntities defined in the DTD.

Keyed by the entity's name.

 o unparsedEntities
 public Hashtable unparsedEntities
A Hashtable of UnparsedEntities defined in the DTD.

Keyed by the entity's name.

Constructors

 o DTD
 public DTD()
Construct a new DTD.

Methods

 o createElementType
 public ElementType createElementType(XMLName name)
Create an ElementType by XMLName.

If the ElementType already exists, it is returned. Otherwise, a new ElementType is created.

Parameters:
name - The XMLName of the element type.
Returns:
The ElementType.
 o createElementType
 public ElementType createElementType(String uri,
                                      String localName,
                                      String prefix)
Create an ElementType by URI, local name, and prefix.

If the ElementType already exists, it is returned. Otherwise, a new ElementType is created.

Parameters:
uri - The namespace URI. May be null.
localName - The local name of the element type.
prefix - The namespace prefix. May be null.
Returns:
The ElementType.

All Packages  Class Hierarchy  This Package  Previous  Next  Index