DTD Attribute Types - Enumerated

The enumerated attribute type provides for a list of possible values. This enables the DTD user to provide one value from the list of possible values.

The values must be surrounded by parentheses, and each value must be separated by a pipe (|).

Syntax:

Example:

Valid XML - The following XML document would be valid, as it conforms to the above DTD:

Invalid XML - The following XML document would be invalid because the value of the first attribute does not match one of the options of the ATTLIST declaration: