<!ATTLIST sandwich
id ID #REQUIRED
price CDATA #IMPLIED
taste CDATA #FIXED "yummy"
name (reuben | ham-n-cheese | BLT | PB-n-J ) 'BLT'
>
The general pattern of an attribute declaration has three parts: a
name, a data type, and a behavior. This example declares three
attributes for the element <sandwich>. The
first, named id, is of type ID,
which is a unique string of characters that can be used only once in
any ID-type attribute throughout the document, and is required
because of the #REQUIRED keyword. The second,
named price, is of type CDATA
and is optional, according to the #IMPLIED
keyword. The third, named taste, is fixed with the
value "yummy" and can't be
changed (all <sandwich> elements will
inherit this attribute automatically). Finally, the attribute
name is one of an enumerated list of values, with
the default being 'BLT'.