Sun Java System Web Server 6.1 SP6 Programmer's Guide to Web Applications


Elements can contain subelements. For example, the following file fragment defines the cache element.

<!ELEMENT cache (cache-helper*, default-helper?, property*, cache-mapping*)>

The ELEMENT tag specifies that a cache element can contain cache-helper, default-helper, property, and cache-mapping subelements.

The following table shows how optional suffix characters of subelements determine the requirement rules, or number of allowed occurrences, for the subelements. The left column lists the subelement ending character, and the right column lists the corresponding requirement rule.

Table 6–4 Requirement Rules and Subelement Suffixes

Subelement Suffix  

Requirement Rule  


Can contain zero or more of this subelement.


Can contain zero or one of this subelement.


Must contain one or more of this subelement.

element (no suffix)

Must contain only one of this subelement.

If an element cannot contain other elements, you see EMPTY or (#PCDATA) instead of a list of element names in parentheses.