31
2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1 Introduction 7.2 Schemas vs. DTDs 7.3 Microsoft XML Schema: Describing Elements 7.4 Microsoft XML Schema: Describing Attributes 7.5 Microsoft XML Schema: Data types 7.6 W3C XML Schema 7.7 Case Study: Writing a Microsoft XML Schema for the Day Planner Application 7.8 Internet and World Wide Web Resources

2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements

  • View
    215

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements

2001 Prentice Hall, Inc. All rights reserved.

1

Chapter 7 – Schemas

Outline7.1 Introduction7.2 Schemas vs. DTDs7.3 Microsoft XML Schema: Describing Elements7.4 Microsoft XML Schema: Describing Attributes7.5 Microsoft XML Schema: Data types7.6 W3C XML Schema7.7 Case Study: Writing a Microsoft XML Schema for the Day Planner Application7.8 Internet and World Wide Web Resources

Page 2: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements

2001 Prentice Hall, Inc. All rights reserved.

Outline2

Fig. 7.1 Microsoft XML Schema document.

1 <?xml version = "1.0"?>

2

3 <!-- Fig. 7.2 : intro-schema.xml -->

4 <!-- Microsoft XML Schema showing the ElementType -->

5 <!-- element and element element -->

6

7 <Schema xmlns = "urn:schemas-microsoft-com:xml-data">

8 <ElementType name = "message" content = "textOnly"

9 model = "closed">

10 <description>Text messages</description>

11 </ElementType>

12

13 <ElementType name = "greeting" model = "closed"

14 content = "mixed" order = "many">

15 <element type = "message"/>

16 </ElementType>

17

18 <ElementType name = "myMessage" model = "closed"

19 content = "eltOnly" order = "seq">

20

21 <element type = "greeting" minOccurs = "0"

22 maxOccurs = "1"/>

23 <element type = "message" minOccurs = "1"

24 maxOccurs = "*"/>

25

26 </ElementType>

27 </Schema>

Page 3: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements

2001 Prentice Hall, Inc. All rights reserved.

Outline3

Fig. 7.2 XML document that conforms to intro-schema.xml.

1 <?xml version = "1.0"?>

2

3 <!-- Fig. 7.2 : intro.xml -->

4 <!-- Introduction to Microsoft XML Schema -->

5

6 <myMessage xmlns = "x-schema:intro-schema.xml">

7

8 <greeting>Welcome to XML Schema!

9 <message>This is the first message.</message>

10 </greeting>

11

12 <message>This is the second message.</message>

13 </myMessage>

Page 4: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements

2001 Prentice Hall, Inc. All rights reserved.

4

Page 5: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements

2001 Prentice Hall, Inc. All rights reserved.

Outline5

Fig. 7.3 Well-formed, but invalid XML document.

1 <?xml version = "1.0"?>

2

3 <!-- Fig. 7.3 : intro2.xml -->

4 <!-- An invalid document -->

5

6 <myMessage xmlns = "x-schema:intro-schema.xml">

7

8 <greeting>Welcome to XML Schema!</greeting>

9

10 <message>This is a message that contains another message.

11 <message>This is the inner message.</message>

12 </message>

13

14 </myMessage>

Page 6: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements

2001 Prentice Hall, Inc. All rights reserved.

6

Page 7: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements

2001 Prentice Hall, Inc. All rights reserved.

7

Fig. 7.4 ElementType element attributes.

Attribute Name Description content Describes the element’s content. The valid values

for this attribute are empty (an empty element), eltOnly (may contain only elements), textOnly (may contain only text) and mixed (may contain both elements and text). The default value for this attribute is mixed.

dt:type Defines the element’s data type. Data types exist for real numbers, integers, booleans, etc. Namespace prefix dt qualifies data types. We discuss data types in detail in Section 7.5.

name The element’s name. This is a required attribute.

model Specifies whether elements not defined in the schema are permitted in the element. Valid values are open (the default, which permits the inclusion of elements defined outside the schema) and closed (only elements defined inside the schema are permitted). We use only closed models.

Page 8: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements

2001 Prentice Hall, Inc. All rights reserved.

8

Fig. 7.4 ElementType element attributes. (Part 2)

Attribute Name Description order Specifies the order in which child elements must

occur. The valid values for this attribute are one (exactly one child element is permitted), seq (child elements must appear in the order in which they are defined) and many (child elements can appear in any order, any number of times). The default value is many if attribute content is mixed and is seq if attribute content has the value eltOnly.

Page 9: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements

2001 Prentice Hall, Inc. All rights reserved.

9

Fig. 7.5 Element ElementType’s child elements.

Element Name Description

description Provides a description of the ElementType.

datatype Specifies the data type for the ElementType element. We will discuss data types in Section 7.5.

element Specifies a child element by name.

group Groups related element elements and defines their order and frequency.

AttributeType Defines an attribute.

attribute Specifies an AttributeType for an element.

Page 10: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements

2001 Prentice Hall, Inc. All rights reserved.

10

Fig. 7.6 Element element attributes.

Attribute Name Description

type A required attribute that specifies a child element’s name (i.e., the name defined in the ElementType).

minOccurs Specifies the minimum number of occurrences an element can have. The valid values are 0 (the element is optional) and 1 (the element must occur one or more times). The default value is 1.

maxOccurs Specifies the maximum number of occurrences an element can have. The valid values are 1 (the element occurs at most once) and * (the element can occur any number of times). The default value is 1 unless the ElementType’s content attribute is mixed.

Page 11: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements

2001 Prentice Hall, Inc. All rights reserved.

11

Fig. 7.7 Element group’s attributes.

Attribute Name Description

order Specifies the order in which the elements occur. The valid values are one (contains exactly one child element from the group), seq (all child elements must appear in the sequential order in which they are listed) and many (the child elements can appear in any order, any number of times).

minOccurs Specifies the minimum number of occurrences an element can have. The valid values are 0 (the element is optional) and 1 (the element must occur at least once). The default value is 1.

maxOccurs Specifies the maximum number of occurrences an element can have. The valid values are 1 (the element occurs at most once) and * (the element can occur any number of times). The default value is 1 unless the ElementType’s content attribute is mixed.

Page 12: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements

2001 Prentice Hall, Inc. All rights reserved.

12

Fig. 7.8 Element AttributeType’s attributes.

Attribute Name Description

default Specifies the attribute’s default value.

dt:type Defines the element’s data type. Data types exist for real numbers, integers, booleans, enumerations (i.e., a series of values from which one can be selected), etc. Namespace prefix dt qualifies data types. We discuss data types in detail in Section 7.5.

dt:values Contains an enumeration data type’s values. We discuss the enumeration data type in Section 7.5.

name The attribute name. This is a required attribute.

required Indicates whether the attribute is required. The valid values for this attribute are yes and no. The default value is no.

Page 13: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements

2001 Prentice Hall, Inc. All rights reserved.

13

Fig. 7.9 Element attribute’s attributes.

Attribute Name Description

default Specifies the attribute’s default value. This value overrides the value defined in the AttributeType element.

type Specifies the name of the AttributeType for the attribute. This is a required attribute.

required Indicates whether the attribute is required. Valid values for this attribute are yes and no. The default value is no.

Page 14: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements

2001 Prentice Hall, Inc. All rights reserved.

Outline14

Fig. 7.10 Demonstrating AttributeType and attribute.

1 <?xml version = "1.0"?>

2

3 <!-- Fig. 7.10 : contact-schema.xml -->

4 <!-- Defining attributes -->

5

6 <Schema xmlns = "urn:schemas-microsoft-com:xml-data">

7

8 <ElementType name = "contact" content = "eltOnly" order = "seq"

9 model = "closed">

10

11 <AttributeType name = "owner" required = "yes"/>

12 <attribute type = "owner"/>

13

14 <element type = "name"/>

15 <element type = "address1"/>

16 <element type = "address2" minOccurs = "0" maxOccurs = "1"/>

17 <element type = "city"/>

18 <element type = "state"/>

19 <element type = "zip"/>

20 <element type = "phone" minOccurs = "0" maxOccurs = "*"/>

21 </ElementType>

22

23 <ElementType name = "name" content = "textOnly"

24 model = "closed"/>

25

26 <ElementType name = "address1" content = "textOnly"

27 model = "closed"/>

28

Page 15: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements

2001 Prentice Hall, Inc. All rights reserved.

Outline15

Fig. 7.10 Demonstrating AttributeType and attribute. (Part 2)

29 <ElementType name = "address2" content = "textOnly"

30 model = "closed"/>

31

32 <ElementType name = "city" content = "textOnly"

33 model = "closed"/>

34

35 <ElementType name = "state" content = "textOnly"

36 model = "closed"/>

37

38 <ElementType name = "zip" content = "textOnly" model = "closed"/>

39

40 <ElementType name = "phone" content = "textOnly" model = "closed">

41 <AttributeType name = "location" default = "home"/>

42 <attribute type = "location"/>

43 </ElementType>

44

45 </Schema>

Page 16: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements

2001 Prentice Hall, Inc. All rights reserved.

Outline16

Fig. 7.11Contact list that conforms to contact-schema.xml.

1 <?xml version = "1.0"?>

2

3 <!-- Fig. 7.11 : contact.xml -->

4 <!-- A contact list marked up as XML -->

5

6 <contact owner = "Bob Smith" xmlns = "x-schema:contact-schema.xml">

7 <name>Jane Doe</name>

8 <address1>123 Main St.</address1>

9 <city>Sometown</city>

10 <state>Somestate</state>

11 <zip>12345</zip>

12 <phone>617-555-1234</phone>

13 <phone location = "work">978-555-4321</phone>

14 </contact>

Page 17: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements

2001 Prentice Hall, Inc. All rights reserved.

17

Page 18: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements

2001 Prentice Hall, Inc. All rights reserved.

18

Fig. 7.12 Some Microsoft XML Schema data types.

Data Type Description

boolean 0 (false) or 1 (true).

char A single character (e.g., "D").

string A series of characters (e.g., "Deitel").

float A real number (e.g., 123.4567890).

int A whole number (e.g., 5).

date A date formatted as YYYY-MM-DD (e.g., 2000-04-25).

time A time formatted as HH-MM-SS (e.g., 14:30:00).

id Text that uniquely identifies an element or attribute.

idref A reference to an id.

enumeration A series of values from which only one may be chosen.

Page 19: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements

2001 Prentice Hall, Inc. All rights reserved.

Outline19

Fig. 7.13Using Microsoft XML Schema data types.

1 <?xml version = "1.0"?>

2

3 <!-- Fig. 7.13 : id-schema.xml -->

4 <!-- Using datatype ID -->

5

6 <Schema xmlns = "urn:schemas-microsoft-com:xml-data"

7 xmlns:dt = "urn:schemas-microsoft-com:datatypes">

8

9 <ElementType name = "bookstore" content = "eltOnly"

10 order = "many" model = "closed">

11

12 <element type = "shipping"/>

13 <element type = "book"/>

14 </ElementType>

15

16 <ElementType name = "shipping" content = "eltOnly" order = "seq"

17 model = "closed">

18

Page 20: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements

2001 Prentice Hall, Inc. All rights reserved.

Outline20

Fig. 7.13Using Microsoft XML Schema data types. (Part 2)

19 <AttributeType name = "shipID" dt:type = "id"

20 required = "yes"/>

21 <attribute type = "shipID"/>

22

23 <element type = "duration"/>

24 </ElementType>

25

26 <ElementType name = "duration" content = "textOnly"

27 model = "closed" dt:type = "date"/>

28

29 <ElementType name = "book" content = "textOnly" model = "closed"

30 dt:type = "string">

31

32 <AttributeType name = "shippedBy" dt:type = "idref"/>

33 <attribute type = "shippedBy"/>

34 </ElementType>

35

36 </Schema>

Page 21: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements

2001 Prentice Hall, Inc. All rights reserved.

Outline21

Fig. 7.14XML document conforming to id-schema.xml.

1 <?xml version = "1.0"?>

2

3 <!-- Fig. 7.14 : id.xml -->

4 <!-- Demonstrating ID and IDREF -->

5

6 <bookstore xmlns = "x-schema:id-schema.xml">

7 <shipping shipID = "s1">

8 <duration>2000-08-01</duration>

9 </shipping>

10

11 <shipping shipID = "s2">

12 <duration>2000-08-20</duration>

13 </shipping>

14

15 <book shippedBy = "s1">

16 Java How to Program 3rd edition.

17 </book>

18

19 <book shippedBy = "s2">

20 C How to Program 3rd edition.

21 </book>

22

23 <book shippedBy = "s2">

24 C++ How to Program 3rd edition.

25 </book>

26 </bookstore>

Page 22: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements

2001 Prentice Hall, Inc. All rights reserved.

22

Page 23: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements

2001 Prentice Hall, Inc. All rights reserved.

23

Fig. 7.15 Invalid XML document.

Page 24: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements

2001 Prentice Hall, Inc. All rights reserved.

Outline24

Fig. 7.16Schema for an inventory document.

1 <?xml version = "1.0"?>

2

3 <!-- Fig. 7.16 : inventory-schema.xml -->

4 <!-- Data type example -->

5

6 <Schema xmlns = "urn:schemas-microsoft-com:xml-data"

7 xmlns:dt = "urn:schemas-microsoft-com:datatypes">

8

9 <ElementType name = "inventory" content = "eltOnly"

10 model = "closed">

11 <element type = "book" minOccurs = "0" maxOccurs = "*"/>

12 </ElementType>

13

14 <ElementType name = "book" content = "eltOnly" order = "seq"

15 model = "closed">

16

17 <AttributeType name = "isbn" dt:type = "string"

18 required = "yes"/>

19 <attribute type = "isbn"/>

20

21 <AttributeType name = "inStock" dt:type = "enumeration"

22 dt:values = "yes no" default = "no"/>

23 <attribute type = "inStock"/>

24

Page 25: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements

2001 Prentice Hall, Inc. All rights reserved.

Outline25

Fig. 7.16Schema for an inventory document. (Part 2)

25 <element type = "name"/>

26 <element type = "price"/>

27

28 <group order = "one">

29 <element type = "quantity"/>

30 <element type = "available"/>

31 </group>

32 </ElementType>

33

34 <ElementType name = "name" content = "textOnly" model = "closed"

35 dt:type = "string"/>

36

37 <ElementType name = "price" content = "textOnly" model = "closed"

38 dt:type = "float"/>

39

40 <ElementType name = "quantity" content = "textOnly"

41 dt:type = "int" model = "closed"/>

42

43 <ElementType name = "available" content = "textOnly"

44 dt:type = "date" model = "closed"/>

45 </Schema>

Page 26: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements

2001 Prentice Hall, Inc. All rights reserved.

Outline26

Fig. 7.17XML document conforming to inventory-schema.xml.

1 <?xml version = "1.0"?>

2

3 <!-- Fig. 7.17 : inventory.xml -->

4 <!-- Data type example -->

5

6 <inventory xmlns = "x-schema:inventory-schema.xml">

7 <book isbn = "0-13-012507-5" inStock = "yes">

8 <name>Java How to Program 3/e</name>

9 <price>68.00</price>

10 <quantity>200</quantity>

11 </book>

12

13 <book isbn = "0-13-028418-1" inStock = "no">

14 <name>Perl How to Program</name>

15 <price>68.00</price>

16 <available>2000-12-15</available>

17 </book>

18 </inventory>

Page 27: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements

2001 Prentice Hall, Inc. All rights reserved.

Outline27

Fig. 7.18W3C XML Schema document.

1 <?xml version = "1.0"?>

2

3 <!-- Figure 7.20 : xml-schema.xsd -->

4 <!-- Example W3C XML Schema -->

5

6 <xsd:schema xmlns:xsd = "http://www.w3.org/2000/10/XMLSchema">

7 <xsd:element name = "message" type = "xsd:string"/>

8

9 <xsd:element name = "greeting" type = "greetingType"/>

10

11 <xsd:complexType name = "greetingType" content = "mixed">

12 <xsd:element ref = "message"/>

13 </xsd:complexType>

14

15 <xsd:element name = "myMessage" type = "myMessageType"/>

16

17 <xsd:complexType name = "myMessageType">

18 <xsd:element ref = "greeting" minOccurs = "0"

19 maxOccurs = "1"/>

20 <xsd:element ref = "message" minOccurs = "1"

21 maxOccurs = "unbounded"/>

22 </xsd:complexType>

23 </xsd:schema>

Page 28: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements

2001 Prentice Hall, Inc. All rights reserved.

Outline28

 Fig. 7.19Document that conforms to xml-schema.xsd

1 <?xml version = "1.0"?>

2

3 <!-- Fig. 7.19 : intro3.xml -->

4 <!-- Introduction to W3C XML Schema -->

5

6 <myMessage

7 xmlns:xsd = "http://www.w3.org/2000/10/XMLSchema-instance"

8 xsd:noNamespaceSchemaLocation = "xml-schema.xsd">

9

10 <greeting>Welcome to W3C XML Schema!</greeting>

11 <message>This is a message.</message>

12 <message>This is another message.</message>

13

14 </myMessage>

Page 29: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements

2001 Prentice Hall, Inc. All rights reserved.

29

Page 30: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements

2001 Prentice Hall, Inc. All rights reserved.

Outline30

Fig. 7.20Microsoft XML Schema for dayplanner.xml.

1 <?xml version = "1.0"?>

2

3 <!-- Fig. 7.20 : planner-schema.xml -->

4 <!-- Microsoft XML Schema for day planner -->

5

6 <Schema xmlns = "urn:schemas-microsoft-com:xml-data"

7 xmlns:dt = "urn:schemas-microsoft-com:datatypes">

8

9 <ElementType name = "planner" content = "eltOnly"

10 model = "closed">

11 <element type = "year" minOccurs = "0" maxOccurs = "*"/>

12 </ElementType>

13

14 <ElementType name = "year" content = "eltOnly" model = "closed">

15 <AttributeType name = "value" dt:type = "int"/>

16 <attribute type = "value"/>

17 <element type = "date" minOccurs = "0" maxOccurs = "*"/>

18 </ElementType>

19

Page 31: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements

2001 Prentice Hall, Inc. All rights reserved.

Outline31

Fig. 7.20Microsoft XML Schema for dayplanner.xml. (Part 2)

20 <ElementType name = "date" content = "eltOnly" model = "closed">

21 <AttributeType name = "month" dt:type = "int"/>

22 <attribute type = "month"/>

23

24 <AttributeType name = "day" dt:type = "int"/>

25 <attribute type = "day"/>

26

27 <element type = "note" minOccurs = "0" maxOccurs = "*"/>

28 </ElementType>

29

30 <ElementType name = "note" content = "textOnly" model = "closed"

31 dt:type = "string">

32

33 <AttributeType name = "time" dt:type = "int"/>

34 <attribute type = "time"/>

35 </ElementType>

36

37 </Schema>