Moved some content out of top level of the schema into local sections.
[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 \r
93 \r
94         <xs:element name="ModuleList">\r
95                 <xs:complexType>\r
96                         <xs:sequence>\r
97                                 <xs:element minOccurs="1" maxOccurs="unbounded" name="Module">\r
98                                         <xs:complexType>\r
99                                                 <xs:sequence>\r
100                                                         <xs:element name="Name" minOccurs="1" maxOccurs="1">\r
101                                                                 <xs:annotation>\r
102                                                                         <xs:documentation xml:lang="en-us"> The User Interface Name of\r
103                                                                                 the module. </xs:documentation>\r
104                                                                 </xs:annotation>\r
105                                                                 <xs:complexType>\r
106                                                                         <xs:simpleContent>\r
107                                                                                 <xs:extension base="xs:normalizedString">\r
108                                                                                         <xs:attribute name="BaseName" type="xs:NCName"\r
109                                                                                                 use="required">\r
110                                                                                                 <xs:annotation>\r
111                                                                                                         <xs:documentation xml:lang="en-us"> The BaseName is\r
112                                                                                                                 used to create files and folders during a build, and\r
113                                                                                                                 is used by packaging tools as a keyword to create\r
114                                                                                                                 the INF file. </xs:documentation>\r
115                                                                                                 </xs:annotation>\r
116                                                                                         </xs:attribute>\r
117                                                                                 </xs:extension>\r
118                                                                         </xs:simpleContent>\r
119                                                                 </xs:complexType>\r
120                                                         </xs:element>\r
121                                                         <xs:element ref="GUID" minOccurs="1" maxOccurs="1">\r
122                                                                 <xs:annotation>\r
123                                                                         <xs:documentation xml:lang="en-us"> This is the GUID of the\r
124                                                                                 module. Backward compatible versions of a module can use the\r
125                                                                                 same GUID, however the version attribute must be changed\r
126                                                                                 (incrementally.) Non-backward compatible versions of a\r
127                                                                                 module must also provide a new GUID, while resetting the\r
128                                                                                 version attribute is optional. </xs:documentation>\r
129                                                                 </xs:annotation>\r
130                                                         </xs:element>\r
131                                                         <xs:element name="InstalledFolder" minOccurs="1" maxOccurs="1"\r
132                                                                 type="xs:anyURI">\r
133                                                                 <xs:annotation>\r
134                                                                         <xs:documentation xml:lang="en-us"> This is the WORKSPACE\r
135                                                                                 relative path that the Module was installed in.\r
136                                                                         </xs:documentation>\r
137                                                                 </xs:annotation>\r
138                                                         </xs:element>\r
139                                                         <xs:element name="InfFilename" minOccurs="1" maxOccurs="1"\r
140                                                                 type="xs:anyURI">\r
141                                                                 <xs:annotation>\r
142                                                                         <xs:documentation xml:lang="en-us"> This is filename of the\r
143                                                                                 INF file created in the InstalledFolder (listed above)\r
144                                                                                 during installation. </xs:documentation>\r
145                                                                 </xs:annotation>\r
146                                                         </xs:element>\r
147                                                 </xs:sequence>\r
148                                         </xs:complexType>\r
149                                 </xs:element>\r
150                         </xs:sequence>\r
151                 </xs:complexType>\r
152         </xs:element>\r
153 \r
154         <xs:element name="DistributionPackage">\r
155                 <xs:complexType>\r
156                         <xs:sequence>\r
157                                 <xs:element minOccurs="1" maxOccurs="1" name="Name">\r
158                                         <xs:annotation>\r
159                                                 <xs:documentation xml:lang="en-us"> The User Interface Name of the\r
160                                                         distribution. </xs:documentation>\r
161                                         </xs:annotation>\r
162                                         <xs:complexType>\r
163                                                 <xs:simpleContent>\r
164                                                         <xs:extension base="xs:normalizedString">\r
165                                                                 <xs:attribute name="BaseName" type="xs:NCName" use="required">\r
166                                                                         <xs:annotation>\r
167                                                                                 <xs:documentation xml:lang="en-us"> This is the actual\r
168                                                                                         BaseName used during the installation. Since users may\r
169                                                                                         change the Distribution Package's default BaseName (used\r
170                                                                                         to create the PKG and MANIFEST files) this is the real\r
171                                                                                         name used to create the files. </xs:documentation>\r
172                                                                         </xs:annotation>\r
173                                                                 </xs:attribute>\r
174                                                         </xs:extension>\r
175                                                 </xs:simpleContent>\r
176                                         </xs:complexType>\r
177                                 </xs:element>\r
178                                 <xs:element ref="GUID" minOccurs="1" maxOccurs="1">\r
179                                         <xs:annotation>\r
180                                                 <xs:documentation xml:lang="en-us"> This is the GUID of the\r
181                                                         distribution, backward compatible versions of a distribution can\r
182                                                         use the same GUID, however the version attribute must be changed\r
183                                                         (incrementally.) Non-backward compatible versions of a\r
184                                                         distribution must also provide a new GUID, while resetting the\r
185                                                         version attribute is optional. </xs:documentation>\r
186                                         </xs:annotation>\r
187                                 </xs:element>\r
188                                 <xs:element minOccurs="1" maxOccurs="1" name="PkgFilename"\r
189                                         type="xs:anyURI">\r
190                                         <xs:annotation>\r
191                                                 <xs:documentation xml:lang="en-us"> This is the filename of the XML\r
192                                                         distribution package surface area (PKG) file that was stored in\r
193                                                         the Conf/Pkgs folder of the WORKSPACE for this distribution\r
194                                                         package. </xs:documentation>\r
195                                         </xs:annotation>\r
196                                 </xs:element>\r
197                                 <xs:element minOccurs="1" maxOccurs="1" name="ManifestFilename"\r
198                                         type="xs:anyURI">\r
199                                         <xs:annotation>\r
200                                                 <xs:documentation xml:lang="en-us"> This is the filename of the\r
201                                                         distribution package manifest (.manifest) file that was created\r
202                                                         and stored in the Conf/Pkgs folder of the WORKSPACE for this\r
203                                                         distribution package. The InstallPkg tool must create this file\r
204                                                         using the extracted locations of the content zip file (or,\r
205                                                         alternatively, the user can create the file by redirecting the\r
206                                                         output of the zip -Tv Contents.zip.) </xs:documentation>\r
207                                         </xs:annotation>\r
208                                 </xs:element>\r
209                                 <xs:element minOccurs="1" maxOccurs="1" name="InstalledDate"\r
210                                         type="xs:dateTime" />\r
211                                 <xs:element name="DistributionProperties" minOccurs="0" maxOccurs="1"\r
212                                         nillable="true">\r
213                                         <xs:annotation>\r
214                                                 <xs:documentation xml:lang="en-us"> This section tracks information\r
215                                                         and content that is not associated with either packages or\r
216                                                         modules, or is not required for building packages or modules.\r
217                                                 </xs:documentation>\r
218                                         </xs:annotation>\r
219                                         <xs:complexType>\r
220                                                 <xs:sequence>\r
221                                                         <xs:element name="ToolsList" minOccurs="0" maxOccurs="1">\r
222                                                                 <xs:complexType>\r
223                                                                         <xs:sequence>\r
224                                                                                 <xs:element minOccurs="1" maxOccurs="unbounded"\r
225                                                                                         name="Filename" type="xs:anyURI">\r
226                                                                                         <xs:annotation>\r
227                                                                                                 <xs:documentation xml:lang="en-us"> This is used to\r
228                                                                                                         track the actual installation location of the Tools\r
229                                                                                                         Section files. During an installation, the user may\r
230                                                                                                         change in the installation location, so that it is\r
231                                                                                                         different from the location in the ZIP file. The\r
232                                                                                                         location is not WORKSPACE relative, but the full path\r
233                                                                                                         and filename. </xs:documentation>\r
234                                                                                                 <xs:documentation xml:lang="en-us"> Any removal tools\r
235                                                                                                         must check this value to locate correctly, the items\r
236                                                                                                         that will be removed. </xs:documentation>\r
237                                                                                         </xs:annotation>\r
238                                                                                 </xs:element>\r
239                                                                         </xs:sequence>\r
240                                                                 </xs:complexType>\r
241                                                         </xs:element>\r
242                                                         <xs:element name="MiscellaneousFilesList" minOccurs="0"\r
243                                                                 maxOccurs="1">\r
244                                                                 <xs:complexType>\r
245                                                                         <xs:sequence>\r
246                                                                                 <xs:element name="Filename" minOccurs="1"\r
247                                                                                         maxOccurs="unbounded">\r
248                                                                                         <xs:annotation>\r
249                                                                                                 <xs:documentation xml:lang="en-us"> This is used to\r
250                                                                                                         track the actual installation location of files from\r
251                                                                                                         MiscellaneousFiles sections. During an installation,\r
252                                                                                                         the user may change in the installation location, so\r
253                                                                                                         that it is different from the location in the ZIP\r
254                                                                                                         file. </xs:documentation>\r
255                                                                                                 <xs:documentation xml:lang="en-us"> Any removal tools\r
256                                                                                                         must check this value to locate correctly, the items\r
257                                                                                                         that will be removed. </xs:documentation>\r
258                                                                                         </xs:annotation>\r
259                                                                                 </xs:element>\r
260                                                                         </xs:sequence>\r
261                                                                 </xs:complexType>\r
262                                                         </xs:element>\r
263                                                 </xs:sequence>\r
264                                                 <xs:attribute name="ReadOnly" type="xs:boolean" default="false"\r
265                                                         use="optional">\r
266                                                         <xs:annotation>\r
267                                                                 <xs:documentation xml:lang="en-us">If set to true, all content\r
268                                                                         within this distribution package should NOT be\r
269                                                                 modified.</xs:documentation>\r
270                                                         </xs:annotation>\r
271                                                 </xs:attribute>\r
272                                                 <xs:attribute name="RePackage" type="xs:boolean" default="false"\r
273                                                         use="optional">\r
274                                                         <xs:annotation>\r
275                                                                 <xs:documentation xml:lang="en-us">If set to true, then the\r
276                                                                         content can be repackaged into another distribution\r
277                                                                 package.</xs:documentation>\r
278                                                         </xs:annotation>\r
279                                                 </xs:attribute>\r
280                                                 <xs:attribute name="ModifiedToolsDef" type="xs:boolean"\r
281                                                         default="false" use="optional">\r
282                                                         <xs:annotation>\r
283                                                                 <xs:documentation xml:lang="en-us">If set to true, then either\r
284                                                                         the distribution or one of its packages has a user extensions\r
285                                                                         section that modified the tools_def.txt file.\r
286                                                                 </xs:documentation>\r
287                                                         </xs:annotation>\r
288                                                 </xs:attribute>\r
289                                         </xs:complexType>\r
290                                 </xs:element>\r
291                                 <xs:element name="PackageList" minOccurs="0" maxOccurs="1">\r
292                                         <xs:annotation>\r
293                                                 <xs:documentation xml:lang="en-us"> This section tracks individual\r
294                                                         packages (collections of related items.) Each package listed in\r
295                                                         this section must have a DEC file associated with it.\r
296                                                 </xs:documentation>\r
297                                         </xs:annotation>\r
298                                         <xs:complexType>\r
299                                                 <xs:sequence>\r
300                                                         <xs:element name="Package" minOccurs="1" maxOccurs="unbounded">\r
301                                                                 <xs:complexType>\r
302                                                                         <xs:sequence>\r
303                                                                                 <xs:element name="Name" minOccurs="1" maxOccurs="1">\r
304                                                                                         <xs:annotation>\r
305                                                                                                 <xs:documentation xml:lang="en-us"> The User Interface\r
306                                                                                                         Name of the package. </xs:documentation>\r
307                                                                                         </xs:annotation>\r
308                                                                                         <xs:complexType>\r
309                                                                                                 <xs:simpleContent>\r
310                                                                                                         <xs:extension base="xs:normalizedString">\r
311                                                                                                                 <xs:attribute name="BaseName" type="xs:NCName"\r
312                                                                                                                         use="required">\r
313                                                                                                                         <xs:annotation>\r
314                                                                                                                                 <xs:documentation xml:lang="en-us"> The BaseName\r
315                                                                                                                                         is used to create files and folders during a\r
316                                                                                                                                         build, and is used by packaging tools as a\r
317                                                                                                                                         keyword to create the DEC file.\r
318                                                                                                                                 </xs:documentation>\r
319                                                                                                                         </xs:annotation>\r
320                                                                                                                 </xs:attribute>\r
321                                                                                                         </xs:extension>\r
322                                                                                                 </xs:simpleContent>\r
323                                                                                         </xs:complexType>\r
324                                                                                 </xs:element>\r
325                                                                                 <xs:element ref="GUID" minOccurs="1" maxOccurs="1">\r
326                                                                                         <xs:annotation>\r
327                                                                                                 <xs:documentation xml:lang="en-us"> This is the GUID of\r
328                                                                                                         the package, backward compatible versions of a package\r
329                                                                                                         can use the same GUID, however the version attribute\r
330                                                                                                         must be changed (incrementally.) Non-backward\r
331                                                                                                         compatible versions of a package must also provide a\r
332                                                                                                         new GUID, while resetting the version attribute is\r
333                                                                                                         optional. </xs:documentation>\r
334                                                                                         </xs:annotation>\r
335                                                                                 </xs:element>\r
336                                                                                 <xs:element name="InstalledFolder" type="xs:anyURI"\r
337                                                                                         minOccurs="1" maxOccurs="1">\r
338                                                                                         <xs:annotation>\r
339                                                                                                 <xs:documentation xml:lang="en-us"> This is used to\r
340                                                                                                         track the actual installation location, relative to\r
341                                                                                                         the WORKSPACE. During an installation, the user may be\r
342                                                                                                         presented with an option to relocate package content\r
343                                                                                                         from the ZIP portion of the archive into a different\r
344                                                                                                         location. </xs:documentation>\r
345                                                                                                 <xs:documentation> Any installation tools must modify\r
346                                                                                                         this value if the location is different from the\r
347                                                                                                         default location. </xs:documentation>\r
348                                                                                                 <xs:documentation> Any removal tools must check this\r
349                                                                                                         value to locate correctly, the items that will be\r
350                                                                                                         removed. </xs:documentation>\r
351                                                                                         </xs:annotation>\r
352                                                                                 </xs:element>\r
353                                                                                 <xs:element name="DecFilename" minOccurs="1" maxOccurs="1"\r
354                                                                                         type="xs:anyURI">\r
355                                                                                         <xs:annotation>\r
356                                                                                                 <xs:documentation xml:lang="en-us"> This is the filename\r
357                                                                                                         of the package declaration (DEC) filename created\r
358                                                                                                         during installation in the InstalledFolder listed\r
359                                                                                                         above. </xs:documentation>\r
360                                                                                         </xs:annotation>\r
361                                                                                 </xs:element>\r
362                                                                                 <xs:element ref="ModuleList" minOccurs="0" maxOccurs="1">\r
363                                                                                         <xs:annotation>\r
364                                                                                                 <xs:documentation xml:lang="en-us"> This section is used\r
365                                                                                                         to track the actual installation location, relative to\r
366                                                                                                         the WORKSPACE. Every module that is part of this\r
367                                                                                                         package must be listed here. During an installation,\r
368                                                                                                         the user may be presented with an option to relocate\r
369                                                                                                         module content from the ZIP portion of the archive\r
370                                                                                                         into a different location, the installation tools must\r
371                                                                                                         modify this value if the location is different from\r
372                                                                                                         the default location. Any removal tools must check\r
373                                                                                                         this value to locate correctly, the items that will be\r
374                                                                                                         removed. </xs:documentation>\r
375                                                                                                 <xs:documentation xml:lang="en-us"> The name of any INF\r
376                                                                                                         files that were created during the installation of a\r
377                                                                                                         distribution must also be listed in this section.\r
378                                                                                                 </xs:documentation>\r
379                                                                                         </xs:annotation>\r
380                                                                                 </xs:element>\r
381                                                                         </xs:sequence>\r
382                                                                 </xs:complexType>\r
383                                                         </xs:element>\r
384                                                 </xs:sequence>\r
385                                         </xs:complexType>\r
386                                 </xs:element>\r
387                                 <xs:element ref="ModuleList" minOccurs="0" maxOccurs="1">\r
388                                         <xs:annotation>\r
389                                                 <xs:documentation xml:lang="en-us"> This section is used to record\r
390                                                         distribution packages that contain modules that are not part of a\r
391                                                         package. Modules that are part of packages are listed under the\r
392                                                         Package element of the PackageList section. </xs:documentation>\r
393                                                 <xs:documentation xml:lang="en-us"> Module only distribution will\r
394                                                         typically be for binary only modules, like the enhanced FAT\r
395                                                         driver. </xs:documentation>\r
396                                         </xs:annotation>\r
397                                 </xs:element>\r
398                         </xs:sequence>\r
399                 </xs:complexType>\r
400         </xs:element>\r
401 \r
402         <xs:element name="GUID">\r
403                 <xs:complexType>\r
404                         <xs:simpleContent>\r
405                                 <xs:extension base="RegistryFormatGuid">\r
406                                         <xs:attribute name="Version" type="xs:decimal" use="required" />\r
407                                 </xs:extension>\r
408                         </xs:simpleContent>\r
409                 </xs:complexType>\r
410         </xs:element>\r
411 \r
412         <!-- Simple Types that further restrict allowed content. -->\r
413 \r
414         <xs:simpleType name="RegistryFormatGuid">\r
415                 <xs:annotation>\r
416                         <xs:documentation xml:lang="en-us"> A Registry format GUID must contain\r
417                                 five different Hexadecimal character sets that are separated by a dash\r
418                                 (-) character. </xs:documentation>\r
419                 </xs:annotation>\r
420                 <xs:restriction base="xs:normalizedString">\r
421                         <xs:pattern\r
422                                 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
423                          />\r
424                 </xs:restriction>\r
425         </xs:simpleType>\r
426 \r
427 </xs:schema>\r