1 <?xml version=
"1.0" encoding=
"UTF-8" ?>
3 <xs:schema xmlns:
xs=
"http://www.w3.org/2001/XMLSchema">
4 <xs:simpleType name=
"trueFalse" >
5 <xs:restriction base=
"xs:NMTOKEN" >
6 <xs:enumeration value=
"true" />
7 <xs:enumeration value=
"false" />
11 <xs:simpleType name=
"tableName" >
12 <xs:restriction base=
"xs:string" >
13 <xs:pattern value='[
0-
9a-z_]{
1,
28}'
/>
17 <xs:simpleType name=
"fieldName" >
18 <xs:restriction base=
"xs:string" >
19 <xs:pattern value='[
0-
9a-z_]{
1,
30}'
/>
23 <xs:simpleType name=
"fieldType">
24 <xs:restriction base=
"xs:NMTOKEN">
25 <xs:enumeration value=
"int" />
26 <xs:enumeration value=
"number" />
27 <xs:enumeration value=
"float" />
28 <xs:enumeration value=
"char" />
29 <xs:enumeration value=
"text" />
30 <xs:enumeration value=
"binary" />
31 <xs:enumeration value=
"datetime" />
35 <xs:simpleType name=
"fieldLength" >
36 <xs:restriction base=
"xs:string" >
37 <xs:pattern value='(\d+)|(small|medium|big)'
/>
41 <xs:simpleType name=
"fieldsList" >
42 <xs:restriction base=
"xs:string" >
43 <xs:pattern value='[
0-
9a-z_, ]+'
/>
47 <xs:simpleType name=
"keyType">
48 <xs:restriction base=
"xs:NMTOKEN">
49 <xs:enumeration value=
"primary" />
50 <xs:enumeration value=
"unique" />
51 <xs:enumeration value=
"foreign" />
52 <xs:enumeration value=
"foreign-unique" />
56 <xs:simpleType name=
"statementType">
57 <xs:restriction base=
"xs:NMTOKEN">
58 <xs:enumeration value=
"insert" />
59 <xs:enumeration value=
"update" />
60 <xs:enumeration value=
"delete" />
61 <xs:enumeration value=
"custom" />
66 <xs:element name=
"FIELD">
68 <xs:attribute name=
"NAME" type=
"fieldName" use=
"required" />
69 <xs:attribute name=
"SEQUENCE" type=
"trueFalse" use=
"required" />
70 <xs:attribute name=
"TYPE" type=
"fieldType" use=
"required" />
71 <xs:attribute name=
"LENGTH" type=
"fieldLength" use=
"optional" />
72 <xs:attribute name=
"NOTNULL" type=
"trueFalse" use=
"required" />
73 <xs:attribute name=
"DECIMALS" type=
"xs:positiveInteger" use=
"optional" />
74 <xs:attribute name=
"UNSIGNED" type=
"trueFalse" use=
"optional" />
75 <xs:attribute name=
"ENUM" type=
"trueFalse" use=
"optional" />
76 <xs:attribute name=
"ENUMVALUES" type=
"xs:string" use=
"optional" />
77 <xs:attribute name=
"DEFAULT" type=
"xs:string" use=
"optional" />
78 <xs:attribute name=
"COMMENT" type=
"xs:string" use=
"optional" />
79 <xs:attribute name=
"PREVIOUS" type=
"fieldName" use=
"optional" />
80 <xs:attribute name=
"NEXT" type=
"fieldName" use=
"optional" />
84 <xs:element name=
"FIELDS">
87 <xs:element ref=
"FIELD" maxOccurs=
"unbounded" />
92 <xs:element name=
"INDEX">
94 <xs:attribute name=
"NAME" type=
"xs:NMTOKEN" use=
"required" />
95 <xs:attribute name=
"UNIQUE" type=
"trueFalse" use=
"required" />
96 <xs:attribute name=
"FIELDS" type=
"fieldsList" use=
"required" />
97 <xs:attribute name=
"COMMENT" type=
"xs:string" use=
"optional" />
98 <xs:attribute name=
"PREVIOUS" type=
"xs:NMTOKEN" use=
"optional" />
99 <xs:attribute name=
"NEXT" type=
"xs:NMTOKEN" use=
"optional" />
103 <xs:element name=
"INDEXES">
106 <xs:element ref=
"INDEX" maxOccurs=
"unbounded" />
111 <xs:element name=
"KEY">
113 <xs:attribute name=
"NAME" type=
"xs:NMTOKEN" use=
"required" />
114 <xs:attribute name=
"TYPE" type=
"keyType" use=
"required" />
115 <xs:attribute name=
"FIELDS" type=
"fieldsList" use=
"required" />
116 <xs:attribute name=
"REFTABLE" type=
"tableName" use=
"optional" />
117 <xs:attribute name=
"REFFIELDS" type=
"fieldsList" use=
"optional" />
118 <xs:attribute name=
"COMMENT" type=
"xs:string" use=
"optional" />
119 <xs:attribute name=
"PREVIOUS" type=
"xs:NMTOKEN" use=
"optional" />
120 <xs:attribute name=
"NEXT" type=
"xs:NMTOKEN" use=
"optional" />
124 <xs:element name=
"KEYS">
127 <xs:element ref=
"KEY" maxOccurs=
"unbounded" />
132 <xs:element name=
"SENTENCE">
134 <xs:attribute name=
"TEXT" type=
"xs:string" use=
"required" />
138 <xs:element name=
"SENTENCES">
141 <xs:element ref=
"SENTENCE" maxOccurs=
"unbounded" />
146 <xs:element name=
"STATEMENT">
149 <xs:element ref=
"SENTENCES" />
151 <xs:attribute name=
"NAME" type=
"xs:string" use=
"required" />
152 <xs:attribute name=
"TABLE" type=
"tableName" use=
"required" />
153 <xs:attribute name=
"TYPE" type=
"statementType" use=
"required" />
154 <xs:attribute name=
"COMMENT" type=
"xs:string" use=
"optional" />
155 <xs:attribute name=
"PREVIOUS" type=
"xs:string" use=
"optional" />
156 <xs:attribute name=
"NEXT" type=
"xs:string" use=
"optional" />
160 <xs:element name=
"STATEMENTS">
163 <xs:element ref=
"STATEMENT" maxOccurs=
"unbounded" />
168 <xs:element name=
"TABLE">
171 <xs:element ref=
"FIELDS" />
172 <xs:element ref=
"KEYS" minOccurs=
"0" />
173 <xs:element ref=
"INDEXES" minOccurs=
"0" />
175 <xs:attribute name=
"NAME" type=
"tableName" use=
"required" />
176 <xs:attribute name=
"COMMENT" type=
"xs:string" use=
"optional" />
177 <xs:attribute name=
"PREVIOUS" type=
"tableName" use=
"optional" />
178 <xs:attribute name=
"NEXT" type=
"tableName" use=
"optional" />
182 <xs:element name=
"TABLES">
185 <xs:element ref=
"TABLE" maxOccurs=
"unbounded" />
190 <xs:element name=
"XMLDB">
193 <xs:element ref=
"TABLES" minOccurs=
"0" />
194 <xs:element ref=
"STATEMENTS" minOccurs=
"0" />
196 <xs:attribute name=
"PATH" type=
"xs:string" use=
"required" />
197 <xs:attribute name=
"VERSION" type=
"xs:string" use=
"required" />
198 <xs:attribute name=
"COMMENT" type=
"xs:string" use=
"optional" />