Add-on | DTD example


The format of the population example can be formally specified as:

<!ELEMENT populationdata (continent*)     >
<!ELEMENT continent      (name, country*) >
<!ELEMENT country        (name, province*)>
<!ELEMENT province       (name, city*)    >
<!ELEMENT city           (name, pop)      >
<!ELEMENT name           (#PCDATA)        >
<!ELEMENT pop            (#PCDATA)        >

Comma (,) means "followed by," asterisk (*) means "list of zero or more," #PCDATA means simple text.