-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrecipe.dtd
32 lines (32 loc) · 1.56 KB
/
recipe.dtd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?xml version="1.0" encoding="UTF-8"?>
<!-- recipes is the root element, it can contain one or more recipe elements -->
<!ELEMENT recipes (recipe+)>
<!-- recipe contains all details about a particular recipe (hints is optional here!) -->
<!ELEMENT recipe (name, source, photo, serves, ingredients, preparation, hints?)>
<!-- recipe name-->
<!ELEMENT name (#PCDATA)>
<!-- recipe creator/publisher -->
<!ELEMENT source (#PCDATA)>
<!-- path to recipe image -->
<!ELEMENT photo (#PCDATA)>
<!-- recipe number of servings -->
<!ELEMENT serves (#PCDATA)>
<!-- recipe ingredients, it must contain 1 or more ingriedient elements -->
<!ELEMENT ingredients (ingredient+)>
<!-- recipe ingredient-->
<!ELEMENT ingredient (#PCDATA)>
<!-- recipe ingredient attribute amount, it is optional -->
<!ATTLIST ingredient amount CDATA #IMPLIED>
<!-- recipe ingredient attribute measurement, it is optional -->
<!ATTLIST ingredient measurement CDATA #IMPLIED>
<!-- recipe ingredient attribute optional, specifies whether
the ingriedient is optional or not, it is an optional attribute, takes yes or no values -->
<!ATTLIST ingredient optional ( yes | no ) #IMPLIED>
<!-- recipe preparation element; it contains one or more step elements -->
<!ELEMENT preparation (step+)>
<!-- step element; contains preparation step description -->
<!ELEMENT step (#PCDATA)>
<!-- although hints is an optional element, but if specified it must contain at least one hint tag -->
<!ELEMENT hints (hint+)>
<!-- hint element -->
<!ELEMENT hint (#PCDATA)>