878ddf1f |
1 | <?xml version="1.0" encoding="UTF-8"?>\r |
2 | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.TianoCore.org/2006/Edk2.0" xmlns="http://www.TianoCore.org/2006/Edk2.0">\r |
3 | <!--\r |
4 | Filename: NamingConvention.xsd\r |
5 | \r |
6 | Copyright (c) 2006, Intel Corp.\r |
7 | All rights reserved. This program and the accompanying materials\r |
8 | are licensed and made available under the terms and conditions of the BSD License\r |
9 | which may be found at http://opensource.org/licenses/bsd-license.php\r |
10 | \r |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r |
13 | \r |
14 | -->\r |
15 | <xs:annotation>\r |
16 | <xs:documentation xml:lang="en"> This schema defines various data types and naming conventions including: base name, filename and directory naming conventions. These are all simple data types.</xs:documentation>\r |
17 | </xs:annotation>\r |
18 | <xs:simpleType name="BaseNameConvention">\r |
19 | <xs:annotation>\r |
20 | <xs:documentation xml:lang="en"> Base Names must start with an upper case character, followed by one or more alphanumeric characters and/or an optional underscore (_) character followed by one or more alphanumeric characters. Examples: Base_name3, BASE_NAME3, BaseName3 </xs:documentation>\r |
21 | </xs:annotation>\r |
22 | <xs:restriction base="xs:string">\r |
23 | <xs:pattern value="[A-Z]([a-zA-Z0-9])*(_)?([a-zA-Z0-9])*"/>\r |
24 | </xs:restriction>\r |
25 | </xs:simpleType>\r |
26 | <xs:simpleType name="C_Name">\r |
27 | <xs:annotation>\r |
28 | <xs:documentation xml:lang="en"> C_Names must start with either an underscore (_) character followed by one or more alpha characters, followed by any combination of underscore or alphanumeric characters.</xs:documentation>\r |
29 | </xs:annotation>\r |
30 | <xs:restriction base="xs:string">\r |
31 | <xs:pattern value="((_)*([a-zA-Z])+((_)*[a-zA-Z0-9]*))*"/>\r |
32 | </xs:restriction>\r |
33 | </xs:simpleType>\r |
34 | <xs:simpleType name="DirectoryNamingConvention">\r |
35 | <xs:annotation>\r |
36 | <xs:documentation xml:lang="en"> Directory naming convention is a UNION of DOS an UNIX directory path names </xs:documentation>\r |
37 | </xs:annotation>\r |
38 | <xs:union memberTypes="Directory_DOS Directory_UNIX"/>\r |
39 | </xs:simpleType>\r |
40 | <xs:simpleType name="Directory_DOS">\r |
41 | <xs:annotation>\r |
42 | <xs:documentation xml:lang="en"> Directory naming convention for Windows backslash (\) directory path name </xs:documentation>\r |
43 | </xs:annotation>\r |
44 | <xs:restriction base="xs:string">\r |
45 | <xs:pattern value="([a-zA-Z]:\\)?(((\\?_*-*.*[a-zA-Z0-9]*)*(_*-*.*[a-zA-Z0-9])*)+(\\)?)*"/>\r |
46 | </xs:restriction>\r |
47 | </xs:simpleType>\r |
48 | <xs:simpleType name="Directory_UNIX">\r |
49 | <xs:annotation>\r |
50 | <xs:documentation xml:lang="en"> Directory naming convention for UNIX forwardslash (/) directory path name </xs:documentation>\r |
51 | </xs:annotation>\r |
52 | <xs:restriction base="xs:string">\r |
53 | <xs:pattern value="(\/)?(((_*-*.*[a-zA-Z0-9]*)*(_*-*.*[a-zA-Z0-9])*)+(\/)?)*"/>\r |
54 | </xs:restriction>\r |
55 | </xs:simpleType>\r |
56 | <xs:simpleType name="E-Mail">\r |
57 | <xs:restriction base="xs:string">\r |
58 | <xs:pattern value="[a-zA-Z]+(( )*.?-?[a-zA-Z]*)*@[a-zA-Z]+(( )*.?-?[a-zA-Z]*)*"/>\r |
59 | </xs:restriction>\r |
60 | </xs:simpleType>\r |
61 | <xs:simpleType name="FileNameConvention">\r |
62 | <xs:annotation>\r |
63 | <xs:documentation xml:lang="en"> This defines what a Filename is: Alphanumeric characters and optional underscore (_) or dash (-) characters, followed by a optional dot and more alphanumeric characters. </xs:documentation>\r |
64 | </xs:annotation>\r |
65 | <xs:restriction base="xs:string">\r |
66 | <xs:pattern value="[a-zA-Z][a-zA-Z0-9]*((_)*(-)*(.)*[a-zA-Z0-9]*)*"/>\r |
67 | </xs:restriction>\r |
68 | </xs:simpleType>\r |
69 | <xs:simpleType name="GuidArrayType">\r |
70 | <xs:annotation>\r |
71 | <xs:documentation xml:lang="en"> This defines the minimum specification for a GUID Array which is 8 Hex Digits - 4 Hex Digits - 4 Hex Digits - 8 Hex Bytes, the last 16 Hex Digits can be enclosed in sqiggle {} brackets.</xs:documentation>\r |
72 | </xs:annotation>\r |
73 | <xs:restriction base="xs:string">\r |
74 | <xs:pattern value="0x[a-fA-F0-9]{1,8},( )*0x[a-fA-F0-9]{1,4},( )*0x[a-fA-F0-9]{1,4}(,( )*\{)?(,?( )*0x[a-fA-F0-9]{1,2}){8}( )*(\})?"/>\r |
75 | </xs:restriction>\r |
76 | </xs:simpleType>\r |
77 | <xs:simpleType name="GuidNamingConvention">\r |
78 | <xs:annotation>\r |
79 | <xs:documentation xml:lang="en"> A GUID must contain five different Hexadecimal character sets that are separated by a dash (-) character. </xs:documentation>\r |
80 | </xs:annotation>\r |
81 | <xs:restriction base="xs:string">\r |
82 | <xs:pattern value="[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}"/>\r |
83 | </xs:restriction>\r |
84 | </xs:simpleType>\r |
85 | <xs:simpleType name="GuidType">\r |
86 | <xs:annotation>\r |
87 | <xs:documentation xml:lang="en"> The GUID data is union of GuidNaming Convetion and GuidArrayType. </xs:documentation>\r |
88 | </xs:annotation>\r |
89 | <xs:union memberTypes="GuidArrayType GuidNamingConvention"/>\r |
90 | </xs:simpleType>\r |
91 | <xs:simpleType name="Hex64BitDataType">\r |
92 | <xs:annotation>\r |
93 | <xs:documentation xml:lang="en">Define a Hex 64 Bit Value to be 0x[a-f0-9]{16}</xs:documentation>\r |
94 | </xs:annotation>\r |
95 | <xs:restriction base="xs:string">\r |
96 | <xs:pattern value="(0x)?[a-fA-F0-9]{1,16}"/>\r |
97 | </xs:restriction>\r |
98 | </xs:simpleType>\r |
99 | <xs:simpleType name="HexAddressType">\r |
100 | <xs:annotation>\r |
101 | <xs:documentation xml:lang="en">Define a Hex Address, 0x[a-fA-F0-9]{1,16}</xs:documentation>\r |
102 | </xs:annotation>\r |
103 | <xs:restriction base="xs:string">\r |
104 | <xs:pattern value="0x[a-fA-F0-9]{1,16}"/>\r |
105 | </xs:restriction>\r |
106 | </xs:simpleType>\r |
107 | <xs:simpleType name="HexByteDataType">\r |
108 | <xs:annotation>\r |
109 | <xs:documentation xml:lang="en">Define a Hex Byte Value to be 0x[a-f0-9]{2}</xs:documentation>\r |
110 | </xs:annotation>\r |
111 | <xs:restriction base="xs:string">\r |
112 | <xs:pattern value="(0x)?[a-fA-F0-9]{1,2}"/>\r |
113 | </xs:restriction>\r |
114 | </xs:simpleType>\r |
115 | <xs:simpleType name="HexDataType">\r |
116 | <xs:annotation>\r |
117 | <xs:documentation xml:lang="en">Define a Hex Value to be 0x[a-f0-9]+</xs:documentation>\r |
118 | </xs:annotation>\r |
119 | <xs:restriction base="xs:string">\r |
120 | <xs:pattern value="0x[a-fA-F0-9]+"/>\r |
121 | </xs:restriction>\r |
122 | </xs:simpleType>\r |
123 | <xs:simpleType name="HexDigitType">\r |
124 | <xs:annotation>\r |
125 | <xs:documentation xml:lang="en">Define a Hex Diget to be 0x[a-f0-9]</xs:documentation>\r |
126 | </xs:annotation>\r |
127 | <xs:restriction base="xs:string">\r |
128 | <xs:pattern value="[a-fA-F0-9]{1}"/>\r |
129 | </xs:restriction>\r |
130 | </xs:simpleType>\r |
131 | <xs:simpleType name="HexDoubleWordDataType">\r |
132 | <xs:annotation>\r |
133 | <xs:documentation xml:lang="en">Define a Hex Double Word Value to be 0x[a-f0-9]{8}</xs:documentation>\r |
134 | </xs:annotation>\r |
135 | <xs:restriction base="xs:string">\r |
136 | <xs:pattern value="0x[a-fA-F0-9]{1,8}"/>\r |
137 | </xs:restriction>\r |
138 | </xs:simpleType>\r |
139 | <xs:simpleType name="HexWordDataType">\r |
140 | <xs:annotation>\r |
141 | <xs:documentation xml:lang="en">Define a Hex Word Value to be 0x[a-f0-9]{4}</xs:documentation>\r |
142 | </xs:annotation>\r |
143 | <xs:restriction base="xs:string">\r |
144 | <xs:pattern value="0x[a-fA-F0-9]{1,4}"/>\r |
145 | </xs:restriction>\r |
146 | </xs:simpleType>\r |
147 | <xs:simpleType name="LibraryNameConvention">\r |
148 | <xs:annotation>\r |
149 | <xs:documentation xml:lang="en"> This defines what a Library name is: alphanumeric characters and optional underscore (_) characters. </xs:documentation>\r |
150 | </xs:annotation>\r |
151 | <xs:restriction base="xs:string">\r |
152 | <xs:pattern value="[A-Z][a-zA-Z0-9]*(_*[a-zA-Z0-9])*"/>\r |
153 | </xs:restriction>\r |
154 | </xs:simpleType>\r |
155 | <xs:simpleType name="NameConvention">\r |
156 | <xs:annotation>\r |
157 | <xs:documentation xml:lang="en">What is a name, any series of alphanumeric characters and one or more underline characters that may occur in any position</xs:documentation>\r |
158 | </xs:annotation>\r |
159 | <xs:restriction base="xs:normalizedString">\r |
160 | <xs:pattern value="(_*[a-zA-Z0-9]*_*)+"/>\r |
161 | </xs:restriction>\r |
162 | </xs:simpleType>\r |
163 | <xs:simpleType name="Paragraph">\r |
164 | <xs:annotation>\r |
165 | <xs:documentation xml:lang="en">This describes the normal text of a paragraph that can be used in a license or description tag.</xs:documentation>\r |
166 | </xs:annotation>\r |
167 | <xs:restriction base="xs:normalizedString"/>\r |
168 | </xs:simpleType>\r |
169 | <xs:simpleType name="PlatformNamingConvention">\r |
170 | <xs:annotation>\r |
171 | <xs:documentation xml:lang="en"> This defines what a Platform Name is: Alphanumeric characters and optional underscore (_) or dash (-) characters, followed by a dot and more alphanumeric characters. </xs:documentation>\r |
172 | </xs:annotation>\r |
173 | <xs:restriction base="xs:string">\r |
174 | <xs:pattern value="(([a-zA-Z][a-zA-Z0-9]*)(_)*(.)*)+"/>\r |
175 | </xs:restriction>\r |
176 | </xs:simpleType>\r |
177 | <xs:simpleType name="Sentence">\r |
178 | <xs:annotation>\r |
179 | <xs:documentation xml:lang="en"> This data type requires two or more words </xs:documentation>\r |
180 | </xs:annotation>\r |
181 | <xs:restriction base="xs:normalizedString">\r |
182 | <xs:pattern value="(\w+\W*)+( )+(\W*\w*\W*\s*)*"/>\r |
183 | </xs:restriction>\r |
184 | </xs:simpleType>\r |
185 | <xs:simpleType name="ToolNameConvention">\r |
186 | <xs:annotation>\r |
187 | <xs:documentation xml:lang="en"> This defines what a Tool name is: Alphanumeric characters and optional underscore (_) or dash (-) characters, optionally followed by a dot and more alphanumeric characters. </xs:documentation>\r |
188 | </xs:annotation>\r |
189 | <xs:restriction base="xs:string">\r |
190 | <xs:pattern value="[a-zA-Z][a-zA-Z0-9]*(_*-*.*[a-zA-Z0-9])*"/>\r |
191 | </xs:restriction>\r |
192 | </xs:simpleType>\r |
193 | <xs:simpleType name="UCLetterType">\r |
194 | <xs:annotation>\r |
195 | <xs:documentation xml:lang="en"> Definition of a UpperCase Letter type, which can be any combination of upper case characters followed by zero or more underscore and/or uppercase alphanumeric characters </xs:documentation>\r |
196 | </xs:annotation>\r |
197 | <xs:restriction base="xs:string">\r |
198 | <xs:pattern value="[A-Z]{1}"/>\r |
199 | </xs:restriction>\r |
200 | </xs:simpleType>\r |
201 | <xs:simpleType name="UCNameType">\r |
202 | <xs:annotation>\r |
203 | <xs:documentation xml:lang="en"> Definition of a UpperCase Name, which can be any combination of upper case characters followed by zero or more underscore and/or uppercase alphanumeric characters </xs:documentation>\r |
204 | </xs:annotation>\r |
205 | <xs:restriction base="xs:string">\r |
206 | <xs:pattern value="[A-Z]+(_*[A-Z0-9]*( )*)*"/>\r |
207 | </xs:restriction>\r |
208 | </xs:simpleType>\r |
209 | <xs:simpleType name="UserName">\r |
210 | <xs:annotation>\r |
211 | <xs:documentation xml:lang="en">Specify a User Name</xs:documentation>\r |
212 | </xs:annotation>\r |
213 | <xs:restriction base="xs:string">\r |
214 | <xs:pattern value="[a-zA-Z]+(( )*.?-?[a-zA-Z]*)*"/>\r |
215 | </xs:restriction>\r |
216 | </xs:simpleType>\r |
217 | <xs:simpleType name="V1">\r |
218 | <xs:annotation>\r |
219 | <xs:documentation xml:lang="en">%VAR%(Directory)*(File_Names)*</xs:documentation>\r |
220 | </xs:annotation>\r |
221 | <xs:restriction base="xs:string">\r |
222 | <xs:pattern value="((%[A-Z](_*[A-Z0-9]*)*%)+((((\\)?_*-*.*[a-zA-Z0-9]*)*(_*-*.*[a-zA-Z0-9])*)+(\\)?)*)"/>\r |
223 | </xs:restriction>\r |
224 | </xs:simpleType>\r |
225 | <xs:simpleType name="V2">\r |
226 | <xs:annotation>\r |
227 | <xs:documentation xml:lang="en">($VAR | $( VAR) | ${VAR})(Directory)*(File_Names)</xs:documentation>\r |
228 | </xs:annotation>\r |
229 | <xs:restriction base="xs:string">\r |
230 | <xs:pattern value="(($[A-Z](_*[A-Z0-9]*)*)+||($\([A-Z](_*[A-Z0-9]*)*\))+||($\{[A-Z](_*[A-Z0-9]*)*\})+)+(\/)?(((((_*-*.*[a-zA-Z0-9]*)*(_*-*.*[a-zA-Z0-9])*)+(\/)?)*)*)"/>\r |
231 | </xs:restriction>\r |
232 | </xs:simpleType>\r |
233 | <xs:simpleType name="VariableConvention">\r |
234 | <xs:annotation>\r |
235 | <xs:documentation xml:lang="en">VariableConvention is a UNION of: $VAR, $( VAR), ${VAR} and %VAR% and Directory and File Names</xs:documentation>\r |
236 | </xs:annotation>\r |
237 | <xs:union memberTypes="V1 V2"/>\r |
238 | </xs:simpleType>\r |
239 | <xs:simpleType name="VariableGuidType">\r |
240 | <xs:annotation>\r |
241 | <xs:documentation xml:lang="en"> The GUID data is union of GuidNaming Convetion and GuidArrayType. </xs:documentation>\r |
242 | </xs:annotation>\r |
243 | <xs:union memberTypes="GuidArrayType GuidNamingConvention Zero"/>\r |
244 | </xs:simpleType>\r |
245 | <xs:simpleType name="VariableNamingConvention">\r |
246 | <xs:annotation>\r |
247 | <xs:documentation xml:lang="en">VariableConvention is a UNION of: $VAR, $( VAR), ${VAR} and %VAR%</xs:documentation>\r |
248 | </xs:annotation>\r |
249 | <xs:union memberTypes="Variable_DOS Variable_UNIX Variable_UNIX_Scope1 Variable_UNIX_Scope2"/>\r |
250 | </xs:simpleType>\r |
251 | <xs:simpleType name="Variable_DOS">\r |
252 | <xs:annotation>\r |
253 | <xs:documentation xml:lang="en"> Definition of a DOS Variable Name: %VAR% It must start with an Upper Case character.</xs:documentation>\r |
254 | </xs:annotation>\r |
255 | <xs:restriction base="xs:string">\r |
256 | <xs:pattern value="%[A-Z](_*[A-Z0-9]*)*%"/>\r |
257 | </xs:restriction>\r |
258 | </xs:simpleType>\r |
259 | <xs:simpleType name="Variable_UNIX">\r |
260 | <xs:annotation>\r |
261 | <xs:documentation xml:lang="en"> Definition of a UNIX Variable Name: $VAR It must start with an Upper Case character.</xs:documentation>\r |
262 | </xs:annotation>\r |
263 | <xs:restriction base="xs:string">\r |
264 | <xs:pattern value="$[A-Z](_*[A-Z0-9]*)*"/>\r |
265 | </xs:restriction>\r |
266 | </xs:simpleType>\r |
267 | <xs:simpleType name="Variable_UNIX_Scope1">\r |
268 | <xs:annotation>\r |
269 | <xs:documentation xml:lang="en"> Definition of a UNIX Variable Name: $( VAR1) It must start with an Upper Case character.</xs:documentation>\r |
270 | </xs:annotation>\r |
271 | <xs:restriction base="xs:string">\r |
272 | <xs:pattern value="$\([A-Z](_*[A-Z0-9]*)*\)"/>\r |
273 | </xs:restriction>\r |
274 | </xs:simpleType>\r |
275 | <xs:simpleType name="Variable_UNIX_Scope2">\r |
276 | <xs:annotation>\r |
277 | <xs:documentation xml:lang="en"> Definition of a UNIX Variable Name: ${ VAR1} It must start with an Upper Case character.</xs:documentation>\r |
278 | </xs:annotation>\r |
279 | <xs:restriction base="xs:string">\r |
280 | <xs:pattern value="$\{[A-Z](_*[A-Z0-9]*)*\}"/>\r |
281 | </xs:restriction>\r |
282 | </xs:simpleType>\r |
283 | <xs:simpleType name="VersionDataType">\r |
284 | <xs:annotation>\r |
285 | <xs:documentation xml:lang="en"> Definition of a Version Number, which can be any combination of a number followed by zero or more alphanumeric-dot-alphanumeric characters </xs:documentation>\r |
286 | </xs:annotation>\r |
287 | <xs:restriction base="xs:string">\r |
288 | <xs:pattern value="xs:normalizedString"/>\r |
289 | </xs:restriction>\r |
290 | </xs:simpleType>\r |
291 | <xs:simpleType name="Zero">\r |
292 | <xs:annotation>\r |
293 | <xs:documentation xml:lang="en">Define Zero as a vaild value</xs:documentation>\r |
294 | </xs:annotation>\r |
295 | <xs:restriction base="xs:int">\r |
296 | <xs:pattern value="0"/>\r |
297 | </xs:restriction>\r |
298 | </xs:simpleType>\r |
299 | <xs:simpleType name="OldVersionDataType">\r |
300 | <xs:annotation>\r |
301 | <xs:documentation xml:lang="en"> Definition of a Version Number, which can be any combination of a number followed by zero or more alphanumeric-dot-alphanumeric characters </xs:documentation>\r |
302 | </xs:annotation>\r |
303 | <xs:restriction base="xs:string">\r |
304 | <xs:pattern value="([0-9])+[a-zA-Z0-9]*(-?.?([a-zA-Z0-9])*)*"/>\r |
305 | </xs:restriction>\r |
306 | </xs:simpleType>\r |
307 | </xs:schema>\r |