-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrecipes.dtd
75 lines (75 loc) · 2.86 KB
/
recipes.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<!ENTITY % URI "CDATA">
<!ENTITY % inline "em | reciperef">
<!ENTITY % step "quantity | ingredient | temperature | time | equipment | procedure | note | explanation">
<!ELEMENT recipe (title, meta?, ((group, group+, (steps | activity+)?) | (ingredients, (steps | activity+))), serving?, variation*, storage?)>
<!ATTLIST recipe
photo %URI; #IMPLIED
>
<!ELEMENT title (#PCDATA)>
<!ELEMENT meta (source?, cuisine*, dishtype*, occasion*, comment*, processnote*)>
<!ELEMENT cuisine (#PCDATA)>
<!ELEMENT source (#PCDATA)>
<!ELEMENT dishtype (#PCDATA)>
<!ELEMENT occasion (#PCDATA)>
<!-- enrich with linking stuff -->
<!ELEMENT comment (#PCDATA | %inline;)*>
<!ELEMENT processnote (#PCDATA | %inline; | %step;)*>
<!ELEMENT group (label?, comment?, processnote?, ingredients, (steps | activity+)?)>
<!ELEMENT ingredients (yield?, (ingredient | ingredient_choice)+)>
<!ELEMENT yield (#PCDATA)>
<!-- enrich servings or quantity -->
<!ELEMENT ingredient ((range? | quantity*), variant?, item, preprep?, note?)>
<!ATTLIST ingredient
mainingredient (true | false) "false"
optional (true | false) "false"
>
<!ELEMENT range (quantity, quantity)>
<!ELEMENT quantity (value?, unit?, quantity*, altmeasure*)>
<!ATTLIST quantity
approximate (true | false) "false"
>
<!-- deprecated: simply quantity inside quantity is alt measure -->
<!ELEMENT altmeasure (quantity+)>
<!ELEMENT value (#PCDATA)>
<!ELEMENT unit (#PCDATA)>
<!ELEMENT variant (#PCDATA)>
<!ELEMENT item (#PCDATA | reciperef)*>
<!-- enrich to reference database -->
<!ELEMENT preprep (#PCDATA)>
<!-- inline elements -->
<!ELEMENT note (#PCDATA | %inline;)*>
<!-- optional expanded instructions for the step -->
<!ELEMENT expanded (#PCDATA | %step; | %inline;)*>
<!-- explanation of the reason for a step -->
<!ELEMENT explanation (#PCDATA | %inline;)*>
<!-- enrich to reference things like "chopped" -->
<!ELEMENT ingredient_choice ((ingredient | ingredient_group)*)>
<!ELEMENT ingredient_group (ingredient, ingredient+)>
<!ELEMENT steps (step+)>
<!ELEMENT step (#PCDATA | expanded | %step; | %inline;)*>
<!-- inline elements, quantities, temperatures, etc. -->
<!ATTLIST step
optional (true | false) "false"
photo %URI; #IMPLIED
>
<!ELEMENT activity (label, comment?, processnote?, (steps+ | activity+))>
<!ELEMENT label (#PCDATA)>
<!ELEMENT serving (#PCDATA | %step; | %inline;)*>
<!-- serving suggestions/instructions -->
<!ELEMENT variation (label?, comment?, processnote?, ingredients?, (steps+ | activity+))>
<!-- possibly same content model as step -->
<!ELEMENT storage (#PCDATA)>
<!ELEMENT temperature (#PCDATA)>
<!ATTLIST temperature
scale (Fahrenheit | Celsius) "Fahrenheit"
>
<!ELEMENT time (#PCDATA)>
<!-- equipment: oven, spatula, 9" fry pan, etc. -->
<!ELEMENT equipment (#PCDATA)>
<!-- procedure: bake, stir-fry, etc. -->
<!ELEMENT procedure (#PCDATA)>
<!ELEMENT reciperef (#PCDATA)>
<!ATTLIST reciperef
ref CDATA #REQUIRED
>
<!ELEMENT em (#PCDATA)>