Content ready for review
[people/mcb30/basetools.git] / Conf / XMLSchema / WorkspaceContent.xsd
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <!--\r
3     Filename: WorkspaceContent.xsd\r
4     \r
5     Copyright (c) 2008, Intel Corp.  All rights reserved.\r
6     \r
7     This program and the accompanying materials are licensed and made available \r
8     under the terms and conditions of the BSD License which may be found at \r
9     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:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"\r
16         elementFormDefault="qualified"\r
17         targetNamespace="http://edk2.TianoCore.org/2008/1.0"\r
18         xmlns="http://edk2.TianoCore.org/2008/1.0">\r
19         <xs:annotation>\r
20                 <xs:documentation xml:lang="en-us">This document covers the\r
21                         WorkspaceContent.xml file that tracks what has been installed into an EDK\r
22                         II development WORKSPACE.</xs:documentation>\r
23         </xs:annotation>\r
24         <xs:element name="WorkspaceContent">\r
25                 <xs:annotation>\r
26                         <xs:documentation xml:lang="en-us"> This file describes the distributions,\r
27                                 packages, stand-alone (non-package) modules and miscellaneous files that\r
28                                 have been installed in THIS WORKSPACE. Additionally, any tools that are\r
29                                 installed as part of a distribution are tracked (tools are not required\r
30                                 to be installed within a WORKSPACE.) </xs:documentation>\r
31                 </xs:annotation>\r
32                 <xs:complexType>\r
33                         <xs:sequence>\r
34                                 <xs:element ref="Header" minOccurs="1" maxOccurs="1">\r
35                                         <xs:annotation>\r
36                                                 <xs:documentation xml:lang="en-us"> This section tracks required\r
37                                                         information about this WORKSPACE. </xs:documentation>\r
38                                         </xs:annotation>\r
39                                 </xs:element>\r
40                                 <xs:element ref="DistributionPackage" minOccurs="1"\r
41                                         maxOccurs="unbounded">\r
42                                         <xs:annotation>\r
43                                                 <xs:documentation xml:lang="en-us"> The list of UEFI/PI distribution\r
44                                                         packages that have been installed in this WORKSPACE.\r
45                                                 </xs:documentation>\r
46                                         </xs:annotation>\r
47                                 </xs:element>\r
48                         </xs:sequence>\r
49                 </xs:complexType>\r
50         </xs:element>\r
51 \r
52         <xs:element name="Header">\r
53                 <xs:complexType>\r
54                         <xs:sequence>\r
55                                 <xs:element minOccurs="0" maxOccurs="1" name="Name"\r
56                                         type="xs:normalizedString">\r
57                                         <xs:annotation>\r
58                                                 <xs:documentation xml:lang="en-us"> This User Interface Name can be\r
59                                                         entered during initialization of a WORKSPACE to permit a developer\r
60                                                         to uniquely identify a WORKSPACE. </xs:documentation>\r
61                                                 <xs:documentation xml:lang="en-us"> This value can be used by report\r
62                                                         generators. </xs:documentation>\r
63                                         </xs:annotation>\r
64                                 </xs:element>\r
65                                 <xs:element minOccurs="1" maxOccurs="1" name="AbsolutePath"\r
66                                         type="xs:anyURI">\r
67                                         <xs:annotation>\r
68                                                 <xs:documentation xml:lang="en-us"> When the WORKSPACE is first\r
69                                                         initialized, this is the absolute path to the WORKSPACE. If the\r
70                                                         user moves or re-names the directory, the RmPkg tool will need to\r
71                                                         verify the content of this WORKSPACE before removing any content.\r
72                                                 </xs:documentation>\r
73                                         </xs:annotation>\r
74                                 </xs:element>\r
75                                 <xs:element minOccurs="1" maxOccurs="1" name="LastModifiedDate"\r
76                                         type="xs:dateTime">\r
77                                         <xs:annotation>\r
78                                                 <xs:documentation xml:lang="en-us"> The date and time of the last\r
79                                                         Package Installation or Removal. The format is:\r
80                                                         YYYY-MM-DDThh:mm:ss, for example: 2001-01-31T13:30:00 (note the T\r
81                                                         character separator between the calendar date and the time.\r
82                                                 </xs:documentation>\r
83                                         </xs:annotation>\r
84                                 </xs:element>\r
85                                 <xs:element minOccurs="1" maxOccurs="1"\r
86                                         name="WorkspaceContentSpecification" default="1.0" type="xs:decimal"\r
87                                  />\r
88                         </xs:sequence>\r
89                 </xs:complexType>\r
90         </xs:element>\r
91 \r
92         <xs:element name="PackageList">\r
93                 <xs:annotation>\r
94                         <xs:documentation xml:lang="en-us"> This section tracks individual\r
95                                 packages (collections of related items.) Each package listed in this\r
96                                 section must have a DEC file associated with it. </xs:documentation>\r
97                 </xs:annotation>\r
98                 <xs:complexType>\r
99                         <xs:sequence>\r
100                                 <xs:element name="Package" minOccurs="1" maxOccurs="unbounded">\r
101                                         <xs:complexType>\r
102                                                 <xs:sequence>\r
103                                                         <xs:element name="Name" minOccurs="1" maxOccurs="1">\r
104                                                                 <xs:annotation>\r
105                                                                         <xs:documentation xml:lang="en-us"> The User Interface Name of\r
106                                                                                 the package. </xs:documentation>\r
107                                                                 </xs:annotation>\r
108                                                                 <xs:complexType>\r
109                                                                         <xs:simpleContent>\r
110                                                                                 <xs:extension base="xs:normalizedString">\r
111                                                                                         <xs:attribute name="BaseName" type="xs:NCName"\r
112                                                                                                 use="required">\r
113                                                                                                 <xs:annotation>\r
114                                                                                                         <xs:documentation xml:lang="en-us"> The BaseName is\r
115                                                                                                                 used to create files and folders during a build, and\r
116                                                                                                                 is used by packaging tools as a keyword to create\r
117                                                                                                                 the DEC file. </xs:documentation>\r
118                                                                                                 </xs:annotation>\r
119                                                                                         </xs:attribute>\r
120                                                                                 </xs:extension>\r
121                                                                         </xs:simpleContent>\r
122                                                                 </xs:complexType>\r
123                                                         </xs:element>\r
124                                                         <xs:element ref="GUID" minOccurs="1" maxOccurs="1">\r
125                                                                 <xs:annotation>\r
126                                                                         <xs:documentation xml:lang="en-us"> This is the GUID of the\r
127                                                                                 package, backward compatible versions of a package can use\r
128                                                                                 the same GUID, however the version attribute must be changed\r
129                                                                                 (incrementally.) Non-backward compatible versions of a\r
130                                                                                 package must also provide a new GUID, while resetting the\r
131                                                                                 version attribute is optional. </xs:documentation>\r
132                                                                 </xs:annotation>\r
133                                                         </xs:element>\r
134                                                         <xs:element name="InstalledFolder" type="xs:anyURI" minOccurs="1"\r
135                                                                 maxOccurs="1">\r
136                                                                 <xs:annotation>\r
137                                                                         <xs:documentation xml:lang="en-us"> This is used to track the\r
138                                                                                 actual installation location, relative to the WORKSPACE.\r
139                                                                                 During an installation, the user may be presented with an\r
140                                                                                 option to relocate package content from the ZIP portion of\r
141                                                                                 the archive into a different location. </xs:documentation>\r
142                                                                         <xs:documentation> Any installation tools must modify this\r
143                                                                                 value if the location is different from the default\r
144                                                                                 location. </xs:documentation>\r
145                                                                         <xs:documentation> Any removal tools must check this value to\r
146                                                                                 locate correctly, the items that will be removed.\r
147                                                                         </xs:documentation>\r
148                                                                 </xs:annotation>\r
149                                                         </xs:element>\r
150                                                         <xs:element name="DecFilename" minOccurs="1" maxOccurs="1"\r
151                                                                 type="xs:anyURI">\r
152                                                                 <xs:annotation>\r
153                                                                         <xs:documentation xml:lang="en-us"> The WORKSPACE relative\r
154                                                                                 path and filename of the DEC file. </xs:documentation>\r
155                                                                 </xs:annotation>\r
156                                                         </xs:element>\r
157                                                         <xs:element ref="ModuleList" minOccurs="0" maxOccurs="1">\r
158                                                                 <xs:annotation>\r
159                                                                         <xs:documentation xml:lang="en-us"> This section is used to\r
160                                                                                 track the actual installation location, relative to the\r
161                                                                                 WORKSPACE. Every module that is part of this package must be\r
162                                                                                 listed here. During an installation, the user may be\r
163                                                                                 presented with an option to relocate module content from the\r
164                                                                                 ZIP portion of the archive into a different location, the\r
165                                                                                 installation tools must modify this value if the location is\r
166                                                                                 different from the default location. Any removal tools must\r
167                                                                                 check this value to locate correctly, the items that will be\r
168                                                                                 removed. </xs:documentation>\r
169                                                                         <xs:documentation xml:lang="en-us"> The name of any INF files\r
170                                                                                 that were created during the installation of a distribution\r
171                                                                                 must also be listed in this section. </xs:documentation>\r
172                                                                 </xs:annotation>\r
173                                                         </xs:element>\r
174                                                 </xs:sequence>\r
175                                         </xs:complexType>\r
176                                 </xs:element>\r
177                         </xs:sequence>\r
178                 </xs:complexType>\r
179         </xs:element>\r
180 \r
181         <xs:element name="ModuleList">\r
182                 <xs:complexType>\r
183                         <xs:sequence>\r
184                                 <xs:element minOccurs="1" maxOccurs="unbounded" name="Module">\r
185                                         <xs:complexType>\r
186                                                 <xs:sequence>\r
187                                                         <xs:element name="Name" minOccurs="1" maxOccurs="1">\r
188                                                                 <xs:annotation>\r
189                                                                         <xs:documentation xml:lang="en-us"> The User Interface Name of\r
190                                                                                 the module. </xs:documentation>\r
191                                                                 </xs:annotation>\r
192                                                                 <xs:complexType>\r
193                                                                         <xs:simpleContent>\r
194                                                                                 <xs:extension base="xs:normalizedString">\r
195                                                                                         <xs:attribute name="BaseName" type="xs:NCName"\r
196                                                                                                 use="required">\r
197                                                                                                 <xs:annotation>\r
198                                                                                                         <xs:documentation xml:lang="en-us"> The BaseName is\r
199                                                                                                                 used to create files and folders during a build, and\r
200                                                                                                                 is used by packaging tools as a keyword to create\r
201                                                                                                                 the INF file. </xs:documentation>\r
202                                                                                                 </xs:annotation>\r
203                                                                                         </xs:attribute>\r
204                                                                                 </xs:extension>\r
205                                                                         </xs:simpleContent>\r
206                                                                 </xs:complexType>\r
207                                                         </xs:element>\r
208                                                         <xs:element ref="GUID" minOccurs="1" maxOccurs="1">\r
209                                                                 <xs:annotation>\r
210                                                                         <xs:documentation xml:lang="en-us"> This is the GUID of the\r
211                                                                                 module. Backward compatible versions of a module can use the\r
212                                                                                 same GUID, however the version attribute must be changed\r
213                                                                                 (incrementally.) Non-backward compatible versions of a\r
214                                                                                 module must also provide a new GUID, while resetting the\r
215                                                                                 version attribute is optional. </xs:documentation>\r
216                                                                 </xs:annotation>\r
217                                                         </xs:element>\r
218                                                         <xs:element name="InstalledFolder" minOccurs="1" maxOccurs="1"\r
219                                                                 type="xs:anyURI">\r
220                                                                 <xs:annotation>\r
221                                                                         <xs:documentation xml:lang="en-us"> This is the WORKSPACE\r
222                                                                                 relative path that the Module was installed in.\r
223                                                                         </xs:documentation>\r
224                                                                 </xs:annotation>\r
225                                                         </xs:element>\r
226                                                         <xs:element name="InfFilename" minOccurs="1" maxOccurs="1"\r
227                                                                 type="xs:anyURI">\r
228                                                                 <xs:annotation>\r
229                                                                         <xs:documentation xml:lang="en-us"> This is the WORKSPACE\r
230                                                                                 relative path and filename of the INF file created during\r
231                                                                                 installation. </xs:documentation>\r
232                                                                 </xs:annotation>\r
233                                                         </xs:element>\r
234                                                 </xs:sequence>\r
235                                         </xs:complexType>\r
236                                 </xs:element>\r
237                         </xs:sequence>\r
238                 </xs:complexType>\r
239         </xs:element>\r
240 \r
241         <xs:element name="DistributionPackage">\r
242                 <xs:complexType>\r
243                         <xs:sequence>\r
244                                 <xs:element minOccurs="1" maxOccurs="1" name="Name">\r
245                                         <xs:annotation>\r
246                                                 <xs:documentation xml:lang="en-us"> The User Interface Name of the\r
247                                                         distribution. </xs:documentation>\r
248                                         </xs:annotation>\r
249                                         <xs:complexType>\r
250                                                 <xs:simpleContent>\r
251                                                         <xs:extension base="xs:normalizedString">\r
252                                                                 <xs:attribute name="BaseName" type="xs:NCName" use="required">\r
253                                                                         <xs:annotation>\r
254                                                                                 <xs:documentation xml:lang="en-us"> This is the actual\r
255                                                                                         BaseName used during the installation. Since users may\r
256                                                                                         change the Distribution Package's default BaseName (used\r
257                                                                                         to create the PKG and MANIFEST files) this is the real\r
258                                                                                         name used to create the files. </xs:documentation>\r
259                                                                         </xs:annotation>\r
260                                                                 </xs:attribute>\r
261                                                         </xs:extension>\r
262                                                 </xs:simpleContent>\r
263                                         </xs:complexType>\r
264                                 </xs:element>\r
265                                 <xs:element ref="GUID" minOccurs="1" maxOccurs="1">\r
266                                         <xs:annotation>\r
267                                                 <xs:documentation xml:lang="en-us"> This is the GUID of the\r
268                                                         distribution, backward compatible versions of a distribution can\r
269                                                         use the same GUID, however the version attribute must be changed\r
270                                                         (incrementally.) Non-backward compatible versions of a\r
271                                                         distribution must also provide a new GUID, while resetting the\r
272                                                         version attribute is optional. </xs:documentation>\r
273                                         </xs:annotation>\r
274                                 </xs:element>\r
275                                 <xs:element minOccurs="1" maxOccurs="1" name="PkgFilename"\r
276                                         type="xs:anyURI">\r
277                                         <xs:annotation>\r
278                                                 <xs:documentation xml:lang="en-us"> This is the filename of the XML\r
279                                                         distribution package surface area (PKG) file that was stored in\r
280                                                         the Conf/Pkgs folder of the WORKSPACE for this distribution\r
281                                                         package. </xs:documentation>\r
282                                         </xs:annotation>\r
283                                 </xs:element>\r
284                                 <xs:element minOccurs="1" maxOccurs="1" name="ManifestFilename"\r
285                                         type="xs:anyURI">\r
286                                         <xs:annotation>\r
287                                                 <xs:documentation xml:lang="en-us"> This is the filename of the\r
288                                                         distribution package manifest (.manifest) file that was created\r
289                                                         and stored in the Conf/Pkgs folder of the WORKSPACE for this\r
290                                                         distribution package. </xs:documentation>\r
291                                                 <xs:documentation xml:lang="en-us"> The InstallPkg tool must create\r
292                                                         this file using the extracted locations of the content zip file\r
293                                                         (or, alternatively, the user can create the file by redirecting\r
294                                                         the output of the zip -Tv Contents.zip.) </xs:documentation>\r
295                                         </xs:annotation>\r
296                                 </xs:element>\r
297                                 <xs:element minOccurs="1" maxOccurs="1" name="InstalledDate"\r
298                                         type="xs:dateTime" />\r
299                                 <xs:element name="DistributionProperties" minOccurs="0" maxOccurs="1"\r
300                                         nillable="true">\r
301                                         <xs:complexType>\r
302                                                 <xs:sequence>\r
303                                                         <xs:element ref="ToolsList" minOccurs="0" maxOccurs="1" />\r
304                                                         <xs:element ref="MiscellaneousFilesList" minOccurs="0"\r
305                                                                 maxOccurs="1" />\r
306                                                 </xs:sequence>\r
307                                                 <xs:attribute name="ReadOnly" type="xs:boolean" default="false"\r
308                                                         use="optional">\r
309                                                         <xs:annotation>\r
310                                                                 <xs:documentation xml:lang="en-us">If set to true, all content\r
311                                                                         within this distribution package should NOT be\r
312                                                                 modified.</xs:documentation>\r
313                                                         </xs:annotation>\r
314                                                 </xs:attribute>\r
315                                                 <xs:attribute name="RePackage" type="xs:boolean" default="false"\r
316                                                         use="optional">\r
317                                                         <xs:annotation>\r
318                                                                 <xs:documentation xml:lang="en-us">If set to true, then the\r
319                                                                         content can be repackaged into another distribution\r
320                                                                 package.</xs:documentation>\r
321                                                         </xs:annotation>\r
322                                                 </xs:attribute>\r
323                                                 <xs:attribute name="ModifiedToolsDef" type="xs:boolean"\r
324                                                         default="false" use="optional">\r
325                                                         <xs:annotation>\r
326                                                                 <xs:documentation xml:lang="en-us">If set to true, then either\r
327                                                                         the distribution or one of its packages has a user extensions\r
328                                                                         section that modified the tools_def.txt file.\r
329                                                                 </xs:documentation>\r
330                                                         </xs:annotation>\r
331                                                 </xs:attribute>\r
332                                         </xs:complexType>\r
333                                 </xs:element>\r
334                                 <xs:element ref="PackageList" minOccurs="0" maxOccurs="1">\r
335                                         <xs:annotation>\r
336                                                 <xs:documentation xml:lang="en-us"> This is the listing of packages\r
337                                                         that have been installed as part of a distribution in this\r
338                                                         WORKSPACE. </xs:documentation>\r
339                                         </xs:annotation>\r
340                                 </xs:element>\r
341                                 <xs:element ref="ModuleList" minOccurs="0" maxOccurs="1">\r
342                                         <xs:annotation>\r
343                                                 <xs:documentation xml:lang="en-us"> This section is used to record\r
344                                                         distribution packages that contain modules that are not part of a\r
345                                                         package. Modules that are part of packages are listed under the\r
346                                                         Package element of the PackageList section. </xs:documentation>\r
347                                                 <xs:documentation xml:lang="en-us"> Module only distribution will\r
348                                                         typically be for binary only modules, like the enhanced FAT\r
349                                                         driver. </xs:documentation>\r
350                                         </xs:annotation>\r
351                                 </xs:element>\r
352                         </xs:sequence>\r
353                 </xs:complexType>\r
354         </xs:element>\r
355 \r
356         <xs:element name="ToolsList">\r
357                 <xs:complexType>\r
358                         <xs:sequence>\r
359                                 <xs:element minOccurs="1" maxOccurs="unbounded" name="Filename"\r
360                                         type="xs:anyURI">\r
361                                         <xs:annotation>\r
362                                                 <xs:documentation xml:lang="en-us"> This is used to track the actual\r
363                                                         installation location of the Tools Section files. During an\r
364                                                         installation, the user may change in the installation location, so\r
365                                                         that it is different from the location in the ZIP file. The\r
366                                                         location is not WORKSPACE relative, but the full path and\r
367                                                         filename. </xs:documentation>\r
368                                                 <xs:documentation xml:lang="en-us"> Any removal tools must check\r
369                                                         this value to locate correctly, the items that will be removed.\r
370                                                 </xs:documentation>\r
371                                         </xs:annotation>\r
372                                 </xs:element>\r
373                         </xs:sequence>\r
374                 </xs:complexType>\r
375         </xs:element>\r
376 \r
377         <xs:element name="MiscellaneousFilesList">\r
378                 <xs:complexType>\r
379                         <xs:sequence>\r
380                                 <xs:element name="Filename" minOccurs="1" maxOccurs="unbounded">\r
381                                         <xs:annotation>\r
382                                                 <xs:documentation xml:lang="en-us"> This is used to track the actual\r
383                                                         installation location of files from MiscellaneousFiles sections.\r
384                                                         During an installation, the user may change in the installation\r
385                                                         location, so that it is different from the location in the ZIP\r
386                                                         file. </xs:documentation>\r
387                                                 <xs:documentation xml:lang="en-us"> Any removal tools must check\r
388                                                         this value to locate correctly, the items that will be removed.\r
389                                                 </xs:documentation>\r
390                                         </xs:annotation>\r
391                                 </xs:element>\r
392                         </xs:sequence>\r
393                 </xs:complexType>\r
394         </xs:element>\r
395 \r
396         <xs:element name="GUID">\r
397                 <xs:complexType>\r
398                         <xs:simpleContent>\r
399                                 <xs:extension base="RegistryFormatGuid">\r
400                                         <xs:attribute name="Version" type="xs:decimal" use="required" />\r
401                                 </xs:extension>\r
402                         </xs:simpleContent>\r
403                 </xs:complexType>\r
404         </xs:element>\r
405 \r
406         <!-- Simple Types that further restrict allowed content. -->\r
407 \r
408         <xs:simpleType name="RegistryFormatGuid">\r
409                 <xs:annotation>\r
410                         <xs:documentation xml:lang="en-us"> A Registry format GUID must contain\r
411                                 five different Hexadecimal character sets that are separated by a dash\r
412                                 (-) character. </xs:documentation>\r
413                 </xs:annotation>\r
414                 <xs:restriction base="xs:string">\r
415                         <xs:pattern\r
416                                 value="\s*[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}\s*"\r
417                          />\r
418                 </xs:restriction>\r
419         </xs:simpleType>\r
420 \r
421 </xs:schema>\r