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

5.2. Enumerated attributes

You can specify that attributes must have one of a set of one or more values. Here is the general form of the atype part of the <!ATTLIST...> declaration:

    (value1|value2|...)

For example, suppose you want your <vehicle> element to have a kind attribute that must have a value of either "car", "truck", or "boat":

    <!ATTLIST vehicle
        kind (car|truck|boat) #REQUIRED>

You can also supply a default value in quotes. For example:

    <!ATTLIST vehicle
        kind (car|truck|boat) "car">