Next / Previous / Contents / TCC Help System / NM Tech homepage

6. Declaring and using entities

In a DTD, entities come in four flavors:

6.1. General entities

General entities have names of the form &name;, where the name follows the usual rules for XML names (above).

To declare a general entity, use a declaration of this general form in your DTD:

    <!ENTITY ename "text">

where ename is the name of the entity you are defining (without the initial & and final ;), and text is the text you want substituted for that entity.

For example, to define an entity named &cr; with your copyright string, you might use a declaration like this:

    <!ENTITY cr "Copyright (C) 1763 Cotton Mather LLP">