-
Notifications
You must be signed in to change notification settings - Fork 1
/
VEL.xsd
226 lines (221 loc) · 8.27 KB
/
VEL.xsd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- ========== TOP LEVEL ELEMENTS ==========-->
<xs:element name="variability-exchange-models" type="VariabilityExchangeModels"/>
<!-- ========== VARIABILITY EXCHANGE MODEL(S) ========== -->
<xs:complexType name="VariabilityExchangeModels">
<xs:complexContent>
<xs:extension base="Identifiable">
<xs:sequence>
<xs:element name="version" type="xs:unsignedInt"/>
<xs:element name="variability-exchange-model" type="VariabilityExchangeModel" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="VariabilityExchangeModel">
<xs:complexContent>
<xs:extension base="Identifiable">
<xs:sequence>
<xs:group ref="variationpoint-group" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="type" type="VariabilityExchangeModelTypeEnum" use="required"/>
<xs:attribute name="uri" type="xs:anyURI" use="optional"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<!-- ========== VARIATIONPOINT ========== -->
<xs:complexType name="VariationPoint" abstract="true">
<xs:complexContent>
<xs:extension base="Identifiable">
<xs:sequence>
<xs:element name="variable-artifact" type="ArtifactElement" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="type" type="VariationPointTypeEnum" use="required"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:group name="variationpoint-group">
<xs:choice>
<xs:element name="structural-variationpoint" type="StructuralVariationPoint"/>
<xs:element name="parameter-variationpoint" type="ParameterVariationPoint"/>
</xs:choice>
</xs:group>
<!--Individual variation points-->
<xs:complexType name="StructuralVariationPoint">
<xs:complexContent>
<xs:extension base="VariationPoint">
<xs:sequence>
<xs:element name="variation" type="StructuralVariation" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ParameterVariationPoint">
<xs:complexContent>
<xs:extension base="VariationPoint">
<xs:sequence>
<xs:element name="variation" type="ParameterVariation" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<!-- ========== VARIATION ========== -->
<xs:complexType name="Variation" abstract="true">
<xs:complexContent>
<xs:extension base="Identifiable">
<xs:sequence>
<xs:element name="hierarchy" type="VariationPointHierarchy" minOccurs="0" maxOccurs="1"/>
<xs:element name="dependency" type="VariationDependency" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="condition" type="Expression" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="selected" type="xs:boolean" use="optional"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="VariationPointHierarchy">
<xs:complexContent>
<xs:extension base="Identifiable">
<xs:sequence>
<xs:element name="variationpoint" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="ref" type="xs:IDREF" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="VariationDependency">
<xs:complexContent>
<xs:extension base="Identifiable">
<xs:sequence>
<xs:element name="variation" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="ref" type="xs:IDREF" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="condition" type="Expression" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="type" type="VariationDependencyEnum" use="required"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<!--Individual variations-->
<xs:complexType name="StructuralVariation">
<xs:complexContent>
<xs:extension base="Variation">
<xs:sequence>
<xs:element name="variable-artifact" type="ArtifactElement" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ParameterVariation">
<xs:complexContent>
<xs:extension base="Variation">
<xs:sequence>
<xs:element name="expression" type="Expression" minOccurs="0" maxOccurs="1"/>
<xs:element name="value" type="xs:string" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<!-- ========== EXPRESSIONS ========== -->
<xs:complexType name="Expression">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="type" type="ExpressionLanguageEnum" use="required"/>
<xs:attribute name="datatype" type="xs:string" use="optional"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<!--=========== Special Data ============-->
<xs:complexType name="SpecialData">
<xs:sequence>
<xs:element name="data" type="KeyValuePair" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="optional"/>
</xs:complexType>
<xs:complexType name="KeyValuePair">
<xs:sequence>
<xs:element name="key">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="value">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="type" type="xs:string" use="optional"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<!-- ========== ENUMERATIONS ========== -->
<xs:simpleType name="VariabilityExchangeModelTypeEnum">
<xs:restriction base="xs:string">
<xs:enumeration value="variationpoint-description"/>
<xs:enumeration value="variationpoint-configuration"/>
<xs:enumeration value="variationpoint-partial-configuration"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="VariationPointTypeEnum">
<xs:restriction base="xs:string">
<xs:enumeration value="optional"/>
<xs:enumeration value="or"/>
<xs:enumeration value="xor"/>
</xs:restriction>
</xs:simpleType>
<!-- ========== EXTENDABLE ENUMERATIONS ========== -->
<xs:simpleType name="EnumerationExtension">
<xs:restriction base="xs:string">
<xs:pattern value="x:\S+"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="VariationDependencyBaseEnum">
<xs:restriction base="xs:string">
<xs:enumeration value="requires"/>
<xs:enumeration value="conflicts"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="VariationDependencyEnum">
<xs:union memberTypes="VariationDependencyBaseEnum EnumerationExtension"/>
</xs:simpleType>
<xs:simpleType name="ExpressionLanguageBaseEnum">
<xs:restriction base="xs:string">
<xs:enumeration value="single-feature-condition"/>
<xs:enumeration value="and-feature-condition"/>
<xs:enumeration value="or-feature-condition"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExpressionLanguageEnum">
<xs:union memberTypes="ExpressionLanguageBaseEnum EnumerationExtension"/>
</xs:simpleType>
<!-- ========== AUXILIARY DATA TYPES ========== -->
<xs:complexType name="Identifiable" abstract="true">
<xs:sequence>
<xs:element name="special-data" type="SpecialData" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="name" use="optional">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="id" type="xs:ID" use="required"/>
</xs:complexType>
<xs:complexType name="ArtifactElement">
<xs:sequence>
<xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="type" type="xs:string" use="optional"/>
<xs:attribute name="uri" type="xs:anyURI" use="optional"/>
</xs:complexType>
</xs:schema>