/Users/lyon/j4p/src/xml/classInfo/schema examples/multi schema include/Student.xsd
|
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <xsd:schema xmlns:xsd='http://www.w3.org/2001/XMLSchema'
4 xmlns='http://tfr.com/myClassInfoSchema'
5 targetNamespace='http://tfr.com/myClassInfoSchema'
6 elementFormDefault='qualified'>
7
8 <xsd:annotation>
9 <xsd:documentation>
10 XML Schema defining information
11 about a student
12 </xsd:documentation>
13 </xsd:annotation>
14
15 <xsd:simpleType name="ID9Type">
16 <xsd:restriction base="xsd:integer">
17 <xsd:totalDigits value="9"/>
18 <xsd:minInclusive value="000000000"/>
19 </xsd:restriction>
20 </xsd:simpleType>
21
22 <xsd:simpleType name="YearType">
23 <xsd:restriction base="xsd:integer">
24 <xsd:totalDigits value="4"/>
25 <xsd:minInclusive value="2001"/>
26 </xsd:restriction>
27 </xsd:simpleType>
28
29 <xsd:element name="StudentName" type="xsd:string"/>
30 <xsd:element name="StudentID" type="ID9Type"/>
31 <xsd:element name="YOG" type="YearType"/>
32
33 <xsd:complexType name="StudentType">
34 <xsd:sequence>
35 <xsd:element ref="StudentName"/>
36 <xsd:element ref="StudentID"/>
37 <xsd:element ref="YOG"/>
38 </xsd:sequence>
39 </xsd:complexType>
40
41 </xsd:schema>
42