1 <?xml version="1.0" encoding="UTF-8"?>
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">
4 Filename: NamingConvention.xsd
6 Copyright (c) 2007, Intel Corp.
7 All rights reserved. This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which may be found at http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
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>
18 <xs:simpleType name="C_NameType">
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>
22 <xs:restriction base="xs:string">
23 <xs:pattern value="\s*(_)*[a-zA-Z]+((_)*[a-zA-Z0-9]*)*\s*"/>
26 <xs:simpleType name="FileNameConvention">
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>
30 <xs:restriction base="xs:string">
31 <xs:pattern value="\s*[a-zA-Z](\.?[\-_a-zA-Z0-9]+)*\s*"/>
34 <xs:simpleType name="GuidType">
36 <xs:documentation xml:lang="en"> The GUID data was a union of GuidType1 and GuidType2; standardizing on GuidType2. </xs:documentation>
38 <xs:union memberTypes="GuidType2"/>
40 <xs:simpleType name="GuidType1">
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>
44 <xs:restriction base="xs:string">
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*"/>
48 <xs:simpleType name="GuidType2">
50 <xs:documentation xml:lang="en"> A GUID must contain five different Hexadecimal character sets that are separated by a dash (-) character. </xs:documentation>
52 <xs:restriction base="xs:string">
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*"/>
56 <xs:simpleType name="Hex64BitDataType">
58 <xs:documentation xml:lang="en">Define a Hex 64 Bit Value to be 0x[a-f0-9]{16}</xs:documentation>
60 <xs:restriction base="xs:string">
61 <xs:pattern value="\s*(0x)?[a-fA-F0-9]{1,16}\s*"/>
64 <xs:simpleType name="HexAddressType">
66 <xs:documentation xml:lang="en">Define a Hex Address, 0x[a-fA-F0-9]{1,16}</xs:documentation>
68 <xs:restriction base="xs:string">
69 <xs:pattern value="\s*0x[a-fA-F0-9]{1,16}\s*"/>
72 <xs:simpleType name="HexByteDataType">
74 <xs:documentation xml:lang="en">Define a Hex Byte Value to be 0x[a-f0-9]{2}</xs:documentation>
76 <xs:restriction base="xs:string">
77 <xs:pattern value="\s*(0x)?[a-fA-F0-9]{1,2}\s*"/>
80 <xs:simpleType name="HexDataType">
82 <xs:documentation xml:lang="en">Define a Hex Value to be 0x[a-f0-9]+</xs:documentation>
84 <xs:restriction base="xs:string">
85 <xs:pattern value="\s*0x[a-fA-F0-9]+\s*"/>
88 <xs:simpleType name="HexDigitType">
90 <xs:documentation xml:lang="en">Define a Hex Diget to be 0x[a-f0-9]</xs:documentation>
92 <xs:restriction base="xs:string">
93 <xs:pattern value="\s*[a-fA-F0-9]{1}\s*"/>
96 <xs:simpleType name="HexDoubleWordDataType">
98 <xs:documentation xml:lang="en">Define a Hex Double Word Value to be 0x[a-f0-9]{8}</xs:documentation>
100 <xs:restriction base="xs:string">
101 <xs:pattern value="\s*0x[a-fA-F0-9]{1,8}\s*"/>
104 <xs:simpleType name="HexWordDataType">
106 <xs:documentation xml:lang="en">Define a Hex Word Value to be 0x[a-f0-9]{4}</xs:documentation>
108 <xs:restriction base="xs:string">
109 <xs:pattern value="\s*0x[a-fA-F0-9]{1,4}\s*"/>
112 <xs:simpleType name="KeywordList">
113 <xs:restriction base="xs:string">
114 <xs:minLength value="1"/>
115 <xs:pattern value="\s*[a-zA-Z]+(\ *_*[a-zA-Z0-9]*)*\s*"/>
118 <xs:simpleType name="KeywordType">
119 <xs:restriction base="xs:normalizedString">
120 <xs:pattern value="\s*[a-zA-Z]+(_*[a-zA-Z0-9]*)*\s*"/>
123 <xs:simpleType name="Paragraph">
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>
127 <xs:restriction base="xs:string"/>
129 <xs:simpleType name="PathAndFilename">
131 <xs:documentation xml:lang="en"> Naming convention for a path and file name</xs:documentation>
133 <xs:union memberTypes="xs:normalizedString xs:anyURI"/>
135 <xs:simpleType name="Polarity">
137 <xs:documentation xml:lang="en">Limit Polarity vaild values to 0 and 1</xs:documentation>
139 <xs:restriction base="xs:int">
140 <xs:pattern value="\s*0|1\s*"/>
143 <xs:simpleType name="Sentence">
145 <xs:documentation xml:lang="en"> This data type requires two or more words </xs:documentation>
147 <xs:restriction base="xs:normalizedString">
148 <xs:pattern value="\s*(\w+\W*)+( )+(\W*\w*\W*\s*)*"/>
151 <xs:simpleType name="ToolsNameConvention">
153 <xs:documentation xml:lang="en">This data type is used for ToolCommand, ToolChainFamily and TagName.</xs:documentation>
155 <xs:restriction base="xs:NCName">
156 <xs:pattern value="\s*[a-zA-Z][a-zA-Z0-9]*\s*"/>
159 <xs:simpleType name="UCNameType">
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>
163 <xs:restriction base="xs:string">
164 <xs:pattern value="\s*[A-Z]+(_*[A-Z0-9]*)*\s*"/>
167 <xs:simpleType name="VersionDataType">
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>
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.
174 <xs:restriction base="xs:string">
175 <xs:pattern value="\s*\d+(\.\d+)*\s*"/>
178 <xs:simpleType name="Zero">
180 <xs:documentation xml:lang="en">Define Zero as a vaild value</xs:documentation>
182 <xs:restriction base="xs:int">
183 <xs:pattern value="\s*0\s*"/>