
Having drawn the tree, it is trivial to turn it into a DTD. It suffices to list
every element in the tree and declare their content model based on their
children. The final DTD is in Listing 3.16.
Listing 3.16: The DTD for Banking
<!ENTITY % account “(balance,transaction*)”>
<!ELEMENT accounts (co-owner+,(checking | savings))+>
<!ELEMENT co-owner (#PCDATA)>
<!ELEMENT checking (%account;,fee)>
<!ELEMENT savings (%account;,interest)>
<!ELEMENT fee (#PCDATA)>
<!ELEMENT interest (#PCDATA)>
<!ELEMENT balance (#PCDATA)>
<!ELEMENT transaction (#PCDATA)>
Now I have to publish this DTD under a URI. I like to place versioning
information in the URI (version 1.0, and ...