The pipe character is used to specify an "OR" operation. Thus, the
following DTD snippet would specify an XML document in which all CONTACT
elements would have a NAME child followed by either a PHONE or an EMAIL
element (but not both).
<!ELEMENT CONTACT (NAME, (PHONE | EMAIL))>
<!ELEMENT NAME (#PCDATA)>
<!ELEMENT EMAIL (#PCDATA)>
Note that XML regular expression matching is not a short circuited
system. OR's imply one or the other but not both and not neither. Is
that a tongue twister or what!?! Using examples to make my point,
here are several invalid XML snippets based on the DTD snippet above....
That is invalid because the DTD specified that every CONTACT must have
either a PHONE or an EMAIL. The above has neither.
This one is invalid because the contact has BOTH EMAIL and PHONE
This one is wrong because NAME must appear before EMAIL or PHONE