Advanced DTD exercise
Advanced DTD exercise
Recipe exercise
On the internet you can find a great number of cooking websites with recipes. Most cooking recipes have a similar content types and a similar structure. For this exercise look up online recipes websites and try to find a model to express recipes.
- Identify at least five things that you would like to tag in recipes and think about suitable element and/or attribute names
- Open up your XML editor and create a new XML document called recipe.xml
- Copy and paste the text from one of the recipes that you found online into recipe.xml
- Try to tag the different parts of the recipe with your element and attributes.
- Make sure that the XML document is well-formed by checking well-formedness
- Write a DTD model for your recipe and validate it against your XML