forked from TimSongCoder/LearnJavaForAndroid
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRecipe.xsd
More file actions
30 lines (30 loc) · 921 Bytes
/
Copy pathRecipe.xsd
File metadata and controls
30 lines (30 loc) · 921 Bytes
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
<?xml version="1.0"?>
<!-- Mentions which namespace the schema describes. Should target the default namespace. -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.tutortutor.ca">
<xs:element name="title" type="xs:string"/>
<xs:element name="instructions" type="xs:string"/>
<xs:attribute name="qty" type="xs:unsignedInt" default="1"/>
<xs:element name="recipe">
<xs:complexType>
<xs:sequence>
<xs:element ref="title"/>
<xs:element ref="ingredients"/>
<xs:element ref="instructions"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ingredients">
<xs:complexType>
<xs:sequence>
<xs:element ref="ingredient" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ingredient">
<xs:complexType>
<xs:extension base="xs:string">
<xs:attribute ref="qty"/>
</xs:extension>
</xs:complexType>
</xs:element>