Automatic installer.php lang files by installer_builder (20070726)
[moodle-linuxchix.git] / lib / xmldb / xmldb.xsd
blobee0e594b7595e587b5309be8c1cc2d2c6575e332
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" />
8 </xs:restriction >
9 </xs:simpleType >
11 <xs:simpleType name="tableName" >
12 <xs:restriction base="xs:string" >
13 <xs:pattern value='[0-9a-z_]{1,28}'/>
14 </xs:restriction >
15 </xs:simpleType >
17 <xs:simpleType name="fieldName" >
18 <xs:restriction base="xs:string" >
19 <xs:pattern value='[0-9a-z_]{1,30}'/>
20 </xs:restriction >
21 </xs:simpleType >
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" />
32 </xs:restriction>
33 </xs:simpleType>
35 <xs:simpleType name="fieldLength" >
36 <xs:restriction base="xs:string" >
37 <xs:pattern value='(\d+)|(small|medium|big)'/>
38 </xs:restriction >
39 </xs:simpleType >
41 <xs:simpleType name="fieldsList" >
42 <xs:restriction base="xs:string" >
43 <xs:pattern value='[0-9a-z_, ]+'/>
44 </xs:restriction >
45 </xs:simpleType >
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" />
53 </xs:restriction>
54 </xs:simpleType>
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" />
62 </xs:restriction>
63 </xs:simpleType>
66 <xs:element name="FIELD">
67 <xs:complexType>
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" />
81 </xs:complexType>
82 </xs:element>
84 <xs:element name="FIELDS">
85 <xs:complexType>
86 <xs:sequence>
87 <xs:element ref="FIELD" maxOccurs="unbounded" />
88 </xs:sequence>
89 </xs:complexType>
90 </xs:element>
92 <xs:element name="INDEX">
93 <xs:complexType>
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" />
100 </xs:complexType>
101 </xs:element>
103 <xs:element name="INDEXES">
104 <xs:complexType>
105 <xs:sequence>
106 <xs:element ref="INDEX" maxOccurs="unbounded" />
107 </xs:sequence>
108 </xs:complexType>
109 </xs:element>
111 <xs:element name="KEY">
112 <xs:complexType>
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" />
121 </xs:complexType>
122 </xs:element>
124 <xs:element name="KEYS">
125 <xs:complexType>
126 <xs:sequence>
127 <xs:element ref="KEY" maxOccurs="unbounded" />
128 </xs:sequence>
129 </xs:complexType>
130 </xs:element>
132 <xs:element name="SENTENCE">
133 <xs:complexType>
134 <xs:attribute name="TEXT" type="xs:string" use="required" />
135 </xs:complexType>
136 </xs:element>
138 <xs:element name="SENTENCES">
139 <xs:complexType>
140 <xs:sequence>
141 <xs:element ref="SENTENCE" maxOccurs="unbounded" />
142 </xs:sequence>
143 </xs:complexType>
144 </xs:element>
146 <xs:element name="STATEMENT">
147 <xs:complexType>
148 <xs:sequence>
149 <xs:element ref="SENTENCES" />
150 </xs:sequence>
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" />
157 </xs:complexType>
158 </xs:element>
160 <xs:element name="STATEMENTS">
161 <xs:complexType>
162 <xs:sequence>
163 <xs:element ref="STATEMENT" maxOccurs="unbounded" />
164 </xs:sequence>
165 </xs:complexType>
166 </xs:element>
168 <xs:element name="TABLE">
169 <xs:complexType>
170 <xs:sequence>
171 <xs:element ref="FIELDS" />
172 <xs:element ref="KEYS" minOccurs="0" />
173 <xs:element ref="INDEXES" minOccurs="0" />
174 </xs:sequence>
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" />
179 </xs:complexType>
180 </xs:element>
182 <xs:element name="TABLES">
183 <xs:complexType>
184 <xs:sequence>
185 <xs:element ref="TABLE" maxOccurs="unbounded" />
186 </xs:sequence>
187 </xs:complexType>
188 </xs:element>
190 <xs:element name="XMLDB">
191 <xs:complexType>
192 <xs:sequence>
193 <xs:element ref="TABLES" minOccurs="0" />
194 <xs:element ref="STATEMENTS" minOccurs="0" />
195 </xs:sequence>
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" />
199 </xs:complexType>
200 </xs:element>
202 </xs:schema>