Project

General

Profile

1
<?xml version="1.0" encoding="UTF-8"?>
2
<schema targetNamespace="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:gml="http://www.opengis.net/gml" xmlns:sch="http://www.ascc.net/xml/schematron" xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
3
        attributeFormDefault="unqualified" version="3.1.1.2">
4
	<annotation>
5
		<appinfo source="urn:opengis:specification:gml:schema-xsd:valueObjects:3.1.1">valueObjects.xsd</appinfo>
6
		<documentation>GML conformant schema for Values in which the  
7
		    * scalar Value types and lists have their values recorded in simpleContent elements 
8
		    * complex Value types are built recursively
9
		    
10
		    GML is an OGC Standard.
11
		    Copyright (c) 2001,2005,2010 Open Geospatial Consortium.
12
		    To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ .
13
		</documentation>
14
	</annotation>
15
	<!-- ====================================================================== -->
16
	<!-- geometry and temporal included so that _Geometry and _TimeObject can be added to Value choice group -->
17
	<include schemaLocation="gml.xsd"/>
18
	<include schemaLocation="geometryBasic0d1d.xsd"/>
19
	<include schemaLocation="temporal.xsd"/>
20
	<!-- ====================================================================== -->
21
	<group name="Value">
22
		<annotation>
23
			<documentation>Utility choice group which unifies generic Values defined in this schema document with 
24
			Geometry and Temporal objects and the Measures described above, 
25
			so that any of these may be used within aggregate Values.</documentation>
26
		</annotation>
27
		<choice>
28
			<!-- <element ref="gml:_Value"/> -->
29
			<group ref="gml:ValueObject"/>
30
			<element ref="gml:_Object"/>
31
			<!--			<element ref="gml:_Geometry"/>
32
			<element ref="gml:_TimeObject"/> -->
33
			<element ref="gml:Null"/>
34
		</choice>
35
	</group>
36
	<!-- ====================================================================== -->
37
	<group name="ValueObject">
38
		<choice>
39
			<group ref="gml:ScalarValue"/>
40
			<group ref="gml:ScalarValueList"/>
41
			<group ref="gml:ValueExtent"/>
42
			<element ref="gml:CompositeValue"/>
43
		</choice>
44
	</group>
45
	<!-- ======================================================================
46
	<element name="_Value" abstract="true" substitutionGroup="gml:_Object">
47
		<annotation>
48
			<documentation>Abstract element which acts as the head of a substitution group which contains _ScalarValue, _ScalarValueList and CompositeValue and (transitively) the elements in their substitution groups.  This element may be used in an application schema as a variable, so that in an XML instance document any member of its substitution group may occur.</documentation>
49
		</annotation>
50
	</element> -->
51
	<!-- ====================================================================== -->
52
	<!-- ================== Scalar Values =========================
53
	<element name="_ScalarValue" abstract="true" substitutionGroup="gml:_Value">
54
		<annotation>
55
			<documentation>Abstract element which acts as the head of a substitution group which contains Boolean, Category, Count and Quantity, and (transitively) the elements in their substitution groups.  This element may be used in an application schema as a variable, so that in an XML instance document any member of its substitution group may occur.</documentation>
56
		</annotation>
57
	</element> -->
58
	<group name="ScalarValue">
59
		<choice>
60
			<element ref="gml:Boolean"/>
61
			<element ref="gml:Category"/>
62
			<element ref="gml:Quantity"/>
63
			<element ref="gml:Count"/>
64
		</choice>
65
	</group>
66
	<!-- ======================================================================
67
	<element name="_ScalarValueList" abstract="true" substitutionGroup="gml:_Value">
68
		<annotation>
69
			<documentation>Abstract element which acts as the head of a substitution group which contains the compact encodings BooleanList, CategoryList, CountList and QuantityList, and (transitively) the elements in their substitution groups.  This element may be used in an application schema as a variable, so that in an XML instance document any member of its substitution group may occur.</documentation>
70
		</annotation>
71
	</element> -->
72
	<group name="ScalarValueList">
73
		<choice>
74
			<element ref="gml:BooleanList"/>
75
			<element ref="gml:CategoryList"/>
76
			<element ref="gml:QuantityList"/>
77
			<element ref="gml:CountList"/>
78
		</choice>
79
	</group>
80
	<!-- ====================================================================== -->
81
	<!-- ======================= Boolean ========================
82
	<element name="Boolean" type="boolean" substitutionGroup="gml:_ScalarValue"> -->
83
	<element name="Boolean" type="boolean">
84
		<annotation>
85
			<documentation>A value from two-valued logic, using the XML Schema boolean type.  An instance may take the values {true, false, 1, 0}.</documentation>
86
		</annotation>
87
	</element>
88
	<!--
89
	<element name="BooleanList" type="gml:booleanOrNullList" substitutionGroup="gml:_ScalarValueList"> -->
90
	<element name="BooleanList" type="gml:booleanOrNullList">
91
		<annotation>
92
			<documentation>XML List based on XML Schema boolean type.  An element of this type contains a space-separated list of boolean values {0,1,true,false}</documentation>
93
		</annotation>
94
	</element>
95
	<!-- ====================================================================== -->
96
	<!-- ======================= Category ==========================
97
	<element name="Category" type="gml:CodeType" substitutionGroup="gml:_ScalarValue"> -->
98
	<element name="Category" type="gml:CodeType">
99
		<annotation>
100
			<documentation>A term representing a classification.  It has an optional XML attribute codeSpace, whose value is a URI which identifies a dictionary, codelist or authority for the term.</documentation>
101
		</annotation>
102
	</element>
103
	<!--
104
	<element name="CategoryList" type="gml:CodeOrNullListType" substitutionGroup="gml:_ScalarValueList"> -->
105
	<element name="CategoryList" type="gml:CodeOrNullListType">
106
		<annotation>
107
			<documentation>A space-separated list of terms or nulls.  A single XML attribute codeSpace may be provided, which authorises all the terms in the list.</documentation>
108
		</annotation>
109
	</element>
110
	<!-- ====================================================================== -->
111
	<!-- =========================== Quantity ============================
112
	<element name="Quantity" type="gml:MeasureType" substitutionGroup="gml:_ScalarValue"> -->
113
	<element name="Quantity" type="gml:MeasureType">
114
		<annotation>
115
			<documentation>A numeric value with a scale.  The content of the element is an amount using the XML Schema type double which permits decimal or scientific notation.  An XML attribute uom (unit of measure) is required, whose value is a URI which identifies the definition of the scale or units by which the numeric value must be multiplied.</documentation>
116
		</annotation>
117
	</element>
118
	<!--
119
	<element name="QuantityList" type="gml:MeasureOrNullListType" substitutionGroup="gml:_ScalarValueList"> -->
120
	<element name="QuantityList" type="gml:MeasureOrNullListType">
121
		<annotation>
122
			<documentation>A space separated list of amounts or nulls.  The amounts use the XML Schema type double.  A single XML attribute uom (unit of measure) is required, whose value is a URI which identifies the definition of the scale or units by which all the amounts in the list must be multiplied.</documentation>
123
		</annotation>
124
	</element>
125
	<!-- ====================================================================== -->
126
	<!-- ========================== Count ==========================
127
	<element name="Count" type="integer" substitutionGroup="gml:_ScalarValue"> -->
128
	<element name="Count" type="integer">
129
		<annotation>
130
			<documentation>An integer representing a frequency of occurrence.</documentation>
131
		</annotation>
132
	</element>
133
	<!--
134
	<element name="CountList" type="gml:integerOrNullList" substitutionGroup="gml:_ScalarValueList"> -->
135
	<element name="CountList" type="gml:integerOrNullList">
136
		<annotation>
137
			<documentation>A space-separated list of integers or nulls.</documentation>
138
		</annotation>
139
	</element>
140
	<!-- ====================================================================== -->
141
	<!--                    aggregate Value types                      -->
142
	<!-- ====================================================================== -->
143
	<!-- ===================== ValueCollection ========================== -->
144
	<complexType name="CompositeValueType">
145
		<annotation>
146
			<documentation>Aggregate value built from other Values using the Composite pattern. It contains zero or an arbitrary number of valueComponent elements, and zero or one valueComponents elements.  It may be used for strongly coupled aggregates (vectors, tensors) or for arbitrary collections of values.</documentation>
147
		</annotation>
148
		<complexContent>
149
			<extension base="gml:AbstractGMLType">
150
				<sequence>
151
					<element ref="gml:valueComponent" minOccurs="0" maxOccurs="unbounded"/>
152
					<element ref="gml:valueComponents" minOccurs="0"/>
153
				</sequence>
154
			</extension>
155
		</complexContent>
156
	</complexType>
157
	<!-- <element name="CompositeValue" type="gml:CompositeValueType" substitutionGroup="gml:_Value"> -->
158
	<element name="CompositeValue" type="gml:CompositeValueType">
159
		<annotation>
160
			<documentation>Aggregate value built using the Composite pattern.</documentation>
161
		</annotation>
162
	</element>
163
	<!-- ====================================================================== -->
164
	<!-- ========================= ValueArray ========================== -->
165
	<complexType name="ValueArrayType">
166
		<annotation>
167
			<documentation>A Value Array is used for homogeneous arrays of primitive and aggregate values.  The member values may be scalars, composites, arrays or lists.  ValueArray has the same content model as CompositeValue, but the member values must be homogeneous.  The element declaration contains a Schematron constraint which expresses this restriction precisely.            Since the members are homogeneous, the referenceSystem (uom, codeSpace) may be specified on the ValueArray itself and implicitly inherited by all the members if desired.    Note that a_ScalarValueList is preferred for arrays of Scalar Values since this is a more efficient encoding.</documentation>
168
		</annotation>
169
		<complexContent>
170
			<extension base="gml:CompositeValueType">
171
				<attributeGroup ref="gml:referenceSystem"/>
172
			</extension>
173
		</complexContent>
174
	</complexType>
175
	<!-- -->
176
	<element name="ValueArray" type="gml:ValueArrayType" substitutionGroup="gml:CompositeValue">
177
		<annotation>
178
			<appinfo>
179
				<sch:pattern name="Check either codeSpace or uom not both">
180
					<sch:rule context="gml:ValueArray">
181
						<sch:report test="@codeSpace and @uom">ValueArray may not carry both a reference to a codeSpace and a uom</sch:report>
182
					</sch:rule>
183
				</sch:pattern>
184
				<sch:pattern name="Check components are homogeneous">
185
					<sch:rule context="gml:ValueArray">
186
						<sch:assert test="count(gml:valueComponent/*) = count(gml:valueComponent/*[name() = name(../../gml:valueComponent[1]/*[1])])">All components of <sch:name/> must be of the same type</sch:assert>
187
						<sch:assert test="count(gml:valueComponents/*) = count(gml:valueComponents/*[name() = name(../*[1])])">All components of <sch:name/> must be of the same type</sch:assert>
188
					</sch:rule>
189
				</sch:pattern>
190
			</appinfo>
191
			<documentation>A Value Array is used for homogeneous arrays of primitive and aggregate values.   _ScalarValueList is preferred for arrays of Scalar Values since this is more efficient.  Since "choice" is not available for attribute groups, an external constraint (e.g. Schematron) would be required to enforce the selection of only one of these through schema validation</documentation>
192
		</annotation>
193
	</element>
194
	<!-- attribute group required for ValueArray -->
195
	<attributeGroup name="referenceSystem">
196
		<attribute name="codeSpace" type="anyURI" use="optional"/>
197
		<attribute name="uom" type="anyURI" use="optional"/>
198
	</attributeGroup>
199
	<!-- ====================================================================== -->
200
	<!-- ====================== Typed ValueExtents ============================ -->
201
	<group name="ValueExtent">
202
		<choice>
203
			<element ref="gml:CategoryExtent"/>
204
			<element ref="gml:QuantityExtent"/>
205
			<element ref="gml:CountExtent"/>
206
		</choice>
207
	</group>
208
	<!-- ======================================================================
209
	<element name="QuantityExtent" type="gml:QuantityExtentType" substitutionGroup="gml:_Value"> -->
210
	<element name="QuantityExtent" type="gml:QuantityExtentType">
211
		<annotation>
212
			<documentation>Utility element to store a 2-point range of numeric values. If one member is a null, then this is a single ended interval.</documentation>
213
		</annotation>
214
	</element>
215
	<!-- -->
216
	<complexType name="QuantityExtentType">
217
		<annotation>
218
			<documentation>Restriction of list type to store a 2-point range of numeric values. If one member is a null, then this is a single ended interval.</documentation>
219
		</annotation>
220
		<simpleContent>
221
			<restriction base="gml:MeasureOrNullListType">
222
				<length value="2"/>
223
			</restriction>
224
		</simpleContent>
225
	</complexType>
226
	<!-- ======================================================================
227
	<element name="CategoryExtent" type="gml:CategoryExtentType" substitutionGroup="gml:_Value"> -->
228
	<element name="CategoryExtent" type="gml:CategoryExtentType">
229
		<annotation>
230
			<documentation>Utility element to store a 2-point range of ordinal values. If one member is a null, then this is a single ended interval.</documentation>
231
		</annotation>
232
	</element>
233
	<!-- -->
234
	<complexType name="CategoryExtentType">
235
		<annotation>
236
			<documentation>Restriction of list type to store a 2-point range of ordinal values. If one member is a null, then this is a single ended interval.</documentation>
237
		</annotation>
238
		<simpleContent>
239
			<restriction base="gml:CodeOrNullListType">
240
				<length value="2"/>
241
			</restriction>
242
		</simpleContent>
243
	</complexType>
244
	<!-- ======================================================================
245
	<element name="CountExtent" type="gml:CountExtentType" substitutionGroup="gml:_Value"> -->
246
	<element name="CountExtent" type="gml:CountExtentType">
247
		<annotation>
248
			<documentation>Utility element to store a 2-point range of frequency values. If one member is a null, then this is a single ended interval.</documentation>
249
		</annotation>
250
	</element>
251
	<!-- -->
252
	<simpleType name="CountExtentType">
253
		<annotation>
254
			<documentation>Restriction of list type to store a 2-point range of frequency values. If one member is a null, then this is a single ended interval.</documentation>
255
		</annotation>
256
		<restriction base="gml:integerOrNullList">
257
			<length value="2"/>
258
		</restriction>
259
	</simpleType>
260
	<!-- ====================================================================== -->
261
	<!-- ===================== pieces needed for compositing ==================== -->
262
	<element name="valueProperty" type="gml:ValuePropertyType">
263
		<annotation>
264
			<documentation>Element which refers to, or contains, a Value</documentation>
265
		</annotation>
266
	</element>
267
	<!-- ====================================================================== -->
268
	<element name="valueComponent" type="gml:ValuePropertyType">
269
		<annotation>
270
			<documentation>Element which refers to, or contains, a Value.  This version is used in CompositeValues.</documentation>
271
		</annotation>
272
	</element>
273
	<!-- ====================================================================== -->
274
	<complexType name="ValuePropertyType">
275
		<annotation>
276
			<documentation>GML property which refers to, or contains, a Value</documentation>
277
		</annotation>
278
		<sequence minOccurs="0">
279
			<group ref="gml:Value"/>
280
		</sequence>
281
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
282
	</complexType>
283
	<!-- ====================================================================== -->
284
	<!-- ====================================================================== -->
285
	<element name="valueComponents" type="gml:ValueArrayPropertyType">
286
		<annotation>
287
			<documentation>Element which refers to, or contains, a set of homogeneously typed Values.</documentation>
288
		</annotation>
289
	</element>
290
	<!-- ====================================================================== -->
291
	<complexType name="ValueArrayPropertyType">
292
		<annotation>
293
			<documentation>GML property which refers to, or contains, a set of homogeneously typed Values.</documentation>
294
		</annotation>
295
		<sequence>
296
			<group ref="gml:Value" maxOccurs="unbounded"/>
297
		</sequence>
298
	</complexType>
299
	<!-- ====================== utility typed valueProperty types ===================  -->
300
	<complexType name="ScalarValuePropertyType">
301
		<annotation>
302
			<documentation>Property whose content is a scalar value.</documentation>
303
		</annotation>
304
		<complexContent>
305
			<restriction base="gml:ValuePropertyType">
306
				<sequence minOccurs="0">
307
					<!-- <element ref="gml:_ScalarValue"/> -->
308
					<group ref="gml:ScalarValue"/>
309
				</sequence>
310
			</restriction>
311
		</complexContent>
312
	</complexType>
313
	<complexType name="BooleanPropertyType">
314
		<annotation>
315
			<documentation>Property whose content is a Boolean value.</documentation>
316
		</annotation>
317
		<complexContent>
318
			<restriction base="gml:ValuePropertyType">
319
				<sequence minOccurs="0">
320
					<element ref="gml:Boolean"/>
321
				</sequence>
322
			</restriction>
323
		</complexContent>
324
	</complexType>
325
	<complexType name="CategoryPropertyType">
326
		<annotation>
327
			<documentation>Property whose content is a Category.</documentation>
328
		</annotation>
329
		<complexContent>
330
			<restriction base="gml:ValuePropertyType">
331
				<sequence minOccurs="0">
332
					<element ref="gml:Category"/>
333
				</sequence>
334
			</restriction>
335
		</complexContent>
336
	</complexType>
337
	<complexType name="QuantityPropertyType">
338
		<annotation>
339
			<documentation>Property whose content is a Quantity.</documentation>
340
		</annotation>
341
		<complexContent>
342
			<restriction base="gml:ValuePropertyType">
343
				<sequence minOccurs="0">
344
					<element ref="gml:Quantity"/>
345
				</sequence>
346
			</restriction>
347
		</complexContent>
348
	</complexType>
349
	<complexType name="CountPropertyType">
350
		<annotation>
351
			<documentation>Property whose content is a Count.</documentation>
352
		</annotation>
353
		<complexContent>
354
			<restriction base="gml:ValuePropertyType">
355
				<sequence minOccurs="0">
356
					<element ref="gml:Count"/>
357
				</sequence>
358
			</restriction>
359
		</complexContent>
360
	</complexType>
361
	<!-- ====================================================================== -->
362
</schema>
(29-29/29)