As your applications grow more complex, entities become more important. Entities are objects that you can point to in your XML document using an entity reference. The actual declaration of the entity is made in the Document type definition (DTD).
Entities are divided into two subsets: parameter and general.
Parameter entities
A parameter entity is a text entity that is located solely within the DTD (that is, not in the XML instance document). Parameter entities allow reusable text throughout the DTD code, making programming easier. Parameter entities describe:
▪a single object
▪a homogenous set of complete objects
▪a single property of an object.
These parameter entities are limited to a subset of the properties available in the encyclopedia. All unsupported references to parameter entities are fully expanded in the DTD during the Import process, and their replacement text becomes part of the declaration. Following the initial reversal of a DTD that contains unsupported material, a consistent and reproducible set of information will be generated and reversed.
Their general form is:
<!ENTITY % entity_name "entity_type">
General entities
A general entity is an entity that is used within the XML document itself (under the root element). Their general form is: