The role
attribute,
found on almost all of the elements in DocBook, is a text attribute that
can be used to subclass an element. In some applications, it may be
useful to modify the definition of role
so that authors must choose one of a
specific set of possible values.
In Example 5-14, the role
attribute on the
procedure
element is constrained to the value
required
or optional
.
Example 5-15 adds the value
“large
” to the
db.spacing.enumeration
pattern. Any attribute that is
defined using db.spacing.enumeration
will now have
large
as a legal value. Note that
while it is easy to add a value to an enumeration, to remove a value
from an enumeration you need to redefine the entire enumeration, minus
the values you don’t need.