forked from andreasWallner/recipe-markdown
-
Notifications
You must be signed in to change notification settings - Fork 0
/
recipe.xsd
51 lines (45 loc) · 2.01 KB
/
recipe.xsd
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
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="root">
<xs:complexType>
<xs:sequence>
<xs:element name="recipe" type="recipe" maxOccurs="unbounded" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="recipe">
<xs:sequence>
<xs:element name="meta" type="meta" minOccurs="1" maxOccurs="1" />
<xs:element name="instructions" type="instructions" minOccurs="1" maxOccurs="1" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="meta">
<xs:all>
<xs:element name="title" type="xs:string" />
<xs:element name="size" type="xs:string" minOccurs="0"/>
<xs:element name="lang" type="xs:string" minOccurs="0"/>
<xs:element name="source" type="xs:string" minOccurs="0"/>
<xs:element name="author" type="xs:string" minOccurs="0"/>
<cs:element name="description" type="xs:string" minOccurs="0"/>
</xs:all>
</xs:complexType>
<xs:complexType name="instructions">
<xs:all>
<xs:element name="phase" type="phase" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="waitphase" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
</xs:all>
</xs:complexType>
<xs:complexType name="phase">
<xs:sequence>
<xs:element name="ingredient" type="ingredient" maxOccurs="unbounded" minOccurs="0" />
<xs:element name="step" type="xs:string" maxOccurs="unbounded" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="ingredient">
<xs:all>
<xs:element name="name" type="xs:string" />
<xs:element name="amount" type="xs:string" minOccurs="0" />
<xs:element name="unit" type="xs:string" minOccurs="0" />
</xs:all>
</xs:complexType>
</xs:schema>