Add PciBus Module
[mirror_edk2.git] / BaseTools / Conf / XMLSchema / NamingConvention.xsd
CommitLineData
53ca26a2 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/2007/Edk2.1" xmlns="http://www.TianoCore.org/2007/Edk2.1">\r
3 <!--\r
4 Filename: NamingConvention.xsd\r
5 \r
6 Copyright (c) 2007, 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="C_NameType">\r
19 <xs:annotation>\r
20 <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
21 </xs:annotation>\r
22 <xs:restriction base="xs:string">\r
23 <xs:pattern value="\s*(_)*[a-zA-Z]+((_)*[a-zA-Z0-9]*)*\s*"/>\r
24 </xs:restriction>\r
25 </xs:simpleType>\r
26 <xs:simpleType name="FileNameConvention">\r
27 <xs:annotation>\r
28 <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
29 </xs:annotation>\r
30 <xs:restriction base="xs:string">\r
31 <xs:pattern value="\s*[a-zA-Z](\.?[\-_a-zA-Z0-9]+)*\s*"/>\r
32 </xs:restriction>\r
33 </xs:simpleType>\r
34 <xs:simpleType name="GuidType">\r
35 <xs:annotation>\r
36 <xs:documentation xml:lang="en"> The GUID data was a union of GuidType1 and GuidType2; standardizing on GuidType2. </xs:documentation>\r
37 </xs:annotation>\r
38 <xs:union memberTypes="GuidType2"/>\r
39 </xs:simpleType>\r
40 <xs:simpleType name="GuidType1">\r
41 <xs:annotation>\r
42 <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
43 </xs:annotation>\r
44 <xs:restriction base="xs:string">\r
45 <xs:pattern value="\s*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}( )*(\})?\s*"/>\r
46 </xs:restriction>\r
47 </xs:simpleType>\r
48 <xs:simpleType name="GuidType2">\r
49 <xs:annotation>\r
50 <xs:documentation xml:lang="en"> A GUID must contain five different Hexadecimal character sets that are separated by a dash (-) character. </xs:documentation>\r
51 </xs:annotation>\r
52 <xs:restriction base="xs:string">\r
53 <xs:pattern 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
54 </xs:restriction>\r
55 </xs:simpleType>\r
56 <xs:simpleType name="Hex64BitDataType">\r
57 <xs:annotation>\r
58 <xs:documentation xml:lang="en">Define a Hex 64 Bit Value to be 0x[a-f0-9]{16}</xs:documentation>\r
59 </xs:annotation>\r
60 <xs:restriction base="xs:string">\r
61 <xs:pattern value="\s*(0x)?[a-fA-F0-9]{1,16}\s*"/>\r
62 </xs:restriction>\r
63 </xs:simpleType>\r
64 <xs:simpleType name="HexAddressType">\r
65 <xs:annotation>\r
66 <xs:documentation xml:lang="en">Define a Hex Address, 0x[a-fA-F0-9]{1,16}</xs:documentation>\r
67 </xs:annotation>\r
68 <xs:restriction base="xs:string">\r
69 <xs:pattern value="\s*0x[a-fA-F0-9]{1,16}\s*"/>\r
70 </xs:restriction>\r
71 </xs:simpleType>\r
72 <xs:simpleType name="HexByteDataType">\r
73 <xs:annotation>\r
74 <xs:documentation xml:lang="en">Define a Hex Byte Value to be 0x[a-f0-9]{2}</xs:documentation>\r
75 </xs:annotation>\r
76 <xs:restriction base="xs:string">\r
77 <xs:pattern value="\s*(0x)?[a-fA-F0-9]{1,2}\s*"/>\r
78 </xs:restriction>\r
79 </xs:simpleType>\r
80 <xs:simpleType name="HexDataType">\r
81 <xs:annotation>\r
82 <xs:documentation xml:lang="en">Define a Hex Value to be 0x[a-f0-9]+</xs:documentation>\r
83 </xs:annotation>\r
84 <xs:restriction base="xs:string">\r
85 <xs:pattern value="\s*0x[a-fA-F0-9]+\s*"/>\r
86 </xs:restriction>\r
87 </xs:simpleType>\r
88 <xs:simpleType name="HexDigitType">\r
89 <xs:annotation>\r
90 <xs:documentation xml:lang="en">Define a Hex Diget to be 0x[a-f0-9]</xs:documentation>\r
91 </xs:annotation>\r
92 <xs:restriction base="xs:string">\r
93 <xs:pattern value="\s*[a-fA-F0-9]{1}\s*"/>\r
94 </xs:restriction>\r
95 </xs:simpleType>\r
96 <xs:simpleType name="HexDoubleWordDataType">\r
97 <xs:annotation>\r
98 <xs:documentation xml:lang="en">Define a Hex Double Word Value to be 0x[a-f0-9]{8}</xs:documentation>\r
99 </xs:annotation>\r
100 <xs:restriction base="xs:string">\r
101 <xs:pattern value="\s*0x[a-fA-F0-9]{1,8}\s*"/>\r
102 </xs:restriction>\r
103 </xs:simpleType>\r
104 <xs:simpleType name="HexWordDataType">\r
105 <xs:annotation>\r
106 <xs:documentation xml:lang="en">Define a Hex Word Value to be 0x[a-f0-9]{4}</xs:documentation>\r
107 </xs:annotation>\r
108 <xs:restriction base="xs:string">\r
109 <xs:pattern value="\s*0x[a-fA-F0-9]{1,4}\s*"/>\r
110 </xs:restriction>\r
111 </xs:simpleType>\r
112 <xs:simpleType name="KeywordList">\r
113 <xs:restriction base="xs:string">\r
114 <xs:minLength value="1"/>\r
115 <xs:pattern value="\s*[a-zA-Z]+(\ *_*[a-zA-Z0-9]*)*\s*"/>\r
116 </xs:restriction>\r
117 </xs:simpleType>\r
118 <xs:simpleType name="KeywordType">\r
119 <xs:restriction base="xs:normalizedString">\r
120 <xs:pattern value="\s*[a-zA-Z]+(_*[a-zA-Z0-9]*)*\s*"/>\r
121 </xs:restriction>\r
122 </xs:simpleType>\r
123 <xs:simpleType name="Paragraph">\r
124 <xs:annotation>\r
125 <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
126 </xs:annotation>\r
127 <xs:restriction base="xs:string"/>\r
128 </xs:simpleType>\r
129 <xs:simpleType name="PathAndFilename">\r
130 <xs:annotation>\r
131 <xs:documentation xml:lang="en"> Naming convention for a path and file name</xs:documentation>\r
132 </xs:annotation>\r
133 <xs:union memberTypes="xs:normalizedString xs:anyURI"/>\r
134 </xs:simpleType>\r
135 <xs:simpleType name="Polarity">\r
136 <xs:annotation>\r
137 <xs:documentation xml:lang="en">Limit Polarity vaild values to 0 and 1</xs:documentation>\r
138 </xs:annotation>\r
139 <xs:restriction base="xs:int">\r
140 <xs:pattern value="\s*0|1\s*"/>\r
141 </xs:restriction>\r
142 </xs:simpleType>\r
143 <xs:simpleType name="Sentence">\r
144 <xs:annotation>\r
145 <xs:documentation xml:lang="en"> This data type requires two or more words </xs:documentation>\r
146 </xs:annotation>\r
147 <xs:restriction base="xs:normalizedString">\r
148 <xs:pattern value="\s*(\w+\W*)+( )+(\W*\w*\W*\s*)*"/>\r
149 </xs:restriction>\r
150 </xs:simpleType>\r
151 <xs:simpleType name="ToolsNameConvention">\r
152 <xs:annotation>\r
153 <xs:documentation xml:lang="en">This data type is used for ToolCommand, ToolChainFamily and TagName.</xs:documentation>\r
154 </xs:annotation>\r
155 <xs:restriction base="xs:NCName">\r
156 <xs:pattern value="\s*[a-zA-Z][a-zA-Z0-9]*\s*"/>\r
157 </xs:restriction>\r
158 </xs:simpleType>\r
159 <xs:simpleType name="UCNameType">\r
160 <xs:annotation>\r
161 <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
162 </xs:annotation>\r
163 <xs:restriction base="xs:string">\r
164 <xs:pattern value="\s*[A-Z]+(_*[A-Z0-9]*)*\s*"/>\r
165 </xs:restriction>\r
166 </xs:simpleType>\r
167 <xs:simpleType name="VersionDataType">\r
168 <xs:annotation>\r
169 <xs:documentation xml:lang="en"> Definition of a Version Number, which is one or more strings of decimal digits separated by dots. </xs:documentation>\r
170 <xs:documentation>\r
171 The algorithm to compare two versions A and B is as follows. if A==B, then A is the same version as B. Otherwise, say A is a1.a2.a3...an and B is b1.b2.b3...bn. For the first pair (ai, bi), for i less than n and i less than m, where ai is not equal to bi, if ai is less than bi, then A is less than B. If ai is greater than bi, then A is greater than B. \r
172 </xs:documentation>\r
173 </xs:annotation>\r
174 <xs:restriction base="xs:string">\r
175 <xs:pattern value="\s*\d+(\.\d+)*\s*"/>\r
176 </xs:restriction>\r
177 </xs:simpleType>\r
178 <xs:simpleType name="Zero">\r
179 <xs:annotation>\r
180 <xs:documentation xml:lang="en">Define Zero as a vaild value</xs:documentation>\r
181 </xs:annotation>\r
182 <xs:restriction base="xs:int">\r
183 <xs:pattern value="\s*0\s*"/>\r
184 </xs:restriction>\r
185 </xs:simpleType>\r
186</xs:schema>\r