Recipe DTD schema

The following DTD, called Recipe, is mapped to Java classes described in Table 2-1.

XML document instances conforming to this DTD can have two potential roots: recipe and comments. In this example, recipe is the root.

<!ELEMENT Recipe (#PCDATA | IndexCard | IngredientList StepList)* >
<!ELEMENT IndexCard (Name, Description, Source) >
<!ELEMENT Name (#PCDATA)>
<!ELEMENT Description (#PCDATA)>
<!ELEMENT Source (#PCDATA)>
<!ELEMENT IngredientList (Ingredient+)>
<!ATTLIST IngredientList serves CDATA #REQUIRED>
<!ELEMENT Ingredient (Food,Quantity) >
<!ELEMENT Food (#PCDATA)>
<!ELEMENT Quantity (#PCDATA)>
<!ELEMENT StepList (Step+) >
<!ELEMENT Step (#PCDATA)>
<!ELEMENT Comments (#PCDATA)>