Project

General

Profile

1 10458 tao
<?xml version="1.0" encoding="UTF-8"?>
2
<schema targetNamespace="http://www.opengis.net/gml" xmlns:gml="http://www.opengis.net/gml" xmlns:sch="http://www.ascc.net/xml/schematron" xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" version="3.2.0">
3
	<annotation>
4
		<appinfo source="urn:ogc:specification:gml:schema-xsd:valueObjects:3.2.0">valueObjects.xsd</appinfo>
5
		<documentation>See ISO/DIS 19136 17.5.
6
The elements declared in this Clause build on other GML schema components, in particular gml:AbstractTimeObject, gml:AbstractGeometry, and the following types:  gml:MeasureType, gml:MeasureListType, gml:CodeType, gml:CodeOrNilReasonListType, gml:BooleanOrNilReasonListType, gml:IntegerOrNilReasonList.
7
Of particular interest are elements that are the heads of substitution groups, and one named choice group. These are the primary reasons for the value objects schema, since they may act as variables in the definition of content models, such as Observations, when it is desired to permit alternative value types to occur some of which may have complex content such as arrays, geometry and time objects, and where it is useful not to prescribe the actual value type in advance. The members of the groups include quantities, category classifications, boolean, count, temporal and spatial values, and aggregates of these.
8
The value objects are defined in a hierarchy. The following relationships are defined:
9
-	Concrete elements gml:Quantity, gml:Category, gml:Count and gml:Boolean are substitutable for the abstract element gml:AbstractScalarValue.
10
-	Concrete elements gml:QuantityList, gml:CategoryList, gml:CountList and gml:BooleanList are substitutable for the abstract element gml:AbstractScalarValueList.
11
-	Concrete element gml:ValueArray is substitutable for the concrete element gml:CompositeValue.
12
-	Abstract elements gml:AbstractScalarValue and gml:AbstractScalarValueList, and concrete elements gml:CompositeValue, gml:ValueExtent, gml:CategoryExtent, gml:CountExtent and gml:QuantityExtent are substitutable for abstract element gml:AbstractValue.
13
-	Abstract elements gml:AbstractValue, gml:AbstractTimeObject and gml:AbstractGeometry are all in a choice group named gml:Value, which is used for compositing in gml:CompositeValue and gml:ValueExtent.
14
-	Schemas which need values may use the abstract element gml:AbstractValue in a content model in order to permit any of the gml:AbstractScalarValues, gml:AbstractScalarValueLists, gml:CompositeValue or gml:ValueExtent to occur in an instance, or the named group gml:Value to also permit gml:AbstractTimeObjects, gml:AbstractGeometrys.  </documentation>
15
	</annotation>
16
	<include schemaLocation="geometryBasic0d1d.xsd"/>
17
	<include schemaLocation="temporal.xsd"/>
18
	<element name="Boolean" substitutionGroup="gml:AbstractScalarValue" nillable="true">
19
		<complexType>
20
			<simpleContent>
21
				<extension base="boolean">
22
					<attribute name="nilReason" type="gml:NilReasonType"/>
23
				</extension>
24
			</simpleContent>
25
		</complexType>
26
	</element>
27
	<element name="BooleanList" type="gml:booleanOrNilReasonList" substitutionGroup="gml:AbstractScalarValueList"/>
28
	<element name="Category" substitutionGroup="gml:AbstractScalarValue" nillable="true">
29
		<annotation>
30
			<documentation>A gml:Category has an optional XML attribute codeSpace, whose value is a URI which identifies a dictionary, codelist or authority for the term.</documentation>
31
		</annotation>
32
		<complexType>
33
			<simpleContent>
34
				<extension base="gml:CodeType">
35
					<attribute name="nilReason" type="gml:NilReasonType"/>
36
				</extension>
37
			</simpleContent>
38
		</complexType>
39
	</element>
40
	<element name="CategoryList" type="gml:CodeOrNilReasonListType" substitutionGroup="gml:AbstractScalarValueList"/>
41
	<element name="Count" substitutionGroup="gml:AbstractScalarValue" nillable="true">
42
		<complexType>
43
			<simpleContent>
44
				<extension base="integer">
45
					<attribute name="nilReason" type="gml:NilReasonType"/>
46
				</extension>
47
			</simpleContent>
48
		</complexType>
49
	</element>
50
	<element name="CountList" type="gml:integerOrNilReasonList" substitutionGroup="gml:AbstractScalarValueList"/>
51
	<element name="Quantity" substitutionGroup="gml:AbstractScalarValue" nillable="true">
52
		<annotation>
53
			<documentation>An XML attribute uom (“unit of measure”) is required, whose value is a URI which identifies the definition of a ratio scale or units by which the numeric value shall be multiplied, or an interval or position scale on which the value occurs.</documentation>
54
		</annotation>
55
		<complexType>
56
			<simpleContent>
57
				<extension base="gml:MeasureType">
58
					<attribute name="nilReason" type="gml:NilReasonType"/>
59
				</extension>
60
			</simpleContent>
61
		</complexType>
62
	</element>
63
	<element name="QuantityList" type="gml:MeasureOrNilReasonListType" substitutionGroup="gml:AbstractScalarValueList"/>
64
	<element name="AbstractValue" type="anyType" abstract="true" substitutionGroup="gml:AbstractObject">
65
		<annotation>
66
			<documentation>gml:AbstractValue is an abstract element which acts as the head of a substitution group which contains gml:AbstractScalarValue, gml:AbstractScalarValueList, gml:CompositeValue and gml:ValueExtent, and (transitively) the elements in their substitution groups.
67
These elements may be used in an application schema as variables, so that in an XML instance document any member of its substitution group may occur.</documentation>
68
		</annotation>
69
	</element>
70
	<element name="AbstractScalarValue" type="anyType" abstract="true" substitutionGroup="gml:AbstractValue">
71
		<annotation>
72
			<documentation>gml:AbstractScalarValue is an abstract element which acts as the head of a substitution group which contains gml:Boolean, gml:Category, gml:Count and gml:Quantity, and (transitively) the elements in their substitution groups.</documentation>
73
		</annotation>
74
	</element>
75
	<element name="AbstractScalarValueList" type="anyType" abstract="true" substitutionGroup="gml:AbstractValue">
76
		<annotation>
77
			<documentation>gml:AbstractScalarValueList is an abstract element which acts as the head of a substitution group which contains gml:BooleanList, gml:CategoryList, gml:CountList and gml:QuantityList, and (transitively) the elements in their substitution groups.</documentation>
78
		</annotation>
79
	</element>
80
	<group name="Value">
81
		<annotation>
82
			<documentation>This is a convenience choice group which unifies generic values defined in this Clause with spatial and temporal objects and the measures described above, so that any of these may be used within aggregate values.</documentation>
83
		</annotation>
84
		<choice>
85
			<element ref="gml:AbstractValue"/>
86
			<element ref="gml:AbstractGeometry"/>
87
			<element ref="gml:AbstractTimeObject"/>
88
			<element ref="gml:Null"/>
89
		</choice>
90
	</group>
91
	<element name="valueProperty" type="gml:ValuePropertyType">
92
		<annotation>
93
			<documentation>Property that refers to, or contains, a Value. Convenience element for general use.</documentation>
94
		</annotation>
95
	</element>
96
	<element name="valueComponent" type="gml:ValuePropertyType">
97
		<annotation>
98
			<documentation>Property that refers to, or contains, a Value.</documentation>
99
		</annotation>
100
	</element>
101
	<complexType name="ValuePropertyType">
102
		<sequence minOccurs="0">
103
			<group ref="gml:Value"/>
104
		</sequence>
105
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
106
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
107
	</complexType>
108
	<element name="valueComponents" type="gml:ValueArrayPropertyType">
109
		<annotation>
110
			<documentation>Property that contains Values.</documentation>
111
		</annotation>
112
	</element>
113
	<complexType name="ValueArrayPropertyType">
114
		<sequence maxOccurs="unbounded">
115
			<group ref="gml:Value"/>
116
		</sequence>
117
		<attributeGroup ref="gml:OwnershipAttributeGroup"/>
118
	</complexType>
119
	<element name="CompositeValue" type="gml:CompositeValueType" substitutionGroup="gml:AbstractValue">
120
		<annotation>
121
			<documentation>gml:CompositeValue is an aggregate value built from other values . It contains zero or an arbitrary number of gml:valueComponent elements, and zero or one gml:valueComponents property elements.  It may be used for strongly coupled aggregates (vectors, tensors) or for arbitrary collections of values.</documentation>
122
		</annotation>
123
	</element>
124
	<complexType name="CompositeValueType">
125
		<complexContent>
126
			<extension base="gml:AbstractGMLType">
127
				<sequence>
128
					<element ref="gml:valueComponent" minOccurs="0" maxOccurs="unbounded"/>
129
					<element ref="gml:valueComponents" minOccurs="0"/>
130
				</sequence>
131
				<attributeGroup ref="gml:AggregationAttributeGroup"/>
132
			</extension>
133
		</complexContent>
134
	</complexType>
135
	<element name="ValueArray" type="gml:ValueArrayType" substitutionGroup="gml:CompositeValue">
136
		<annotation>
137
			<documentation>A Value Array is used for homogeneous arrays of primitive and aggregate values.
138
The member values may be scalars, composites, arrays or lists.
139
ValueArray has the same content model as CompositeValue, but the member values shall be homogeneous.  The element declaration contains a Schematron constraint which expresses this restriction precisely.  Since the members are homogeneous, the gml:referenceSystem (uom, codeSpace) may be specified on the gml:ValueArray itself and inherited by all the members if desired.</documentation>
140
			<appinfo>
141
				<sch:pattern name="Check either codeSpace or uom not both">
142
					<sch:rule context="gml:ValueArray">
143
						<sch:report test="@codeSpace and @uom">ValueArray may not carry both a reference to a codeSpace and a uom</sch:report>
144
					</sch:rule>
145
				</sch:pattern>
146
				<sch:pattern name="Check components are homogeneous">
147
					<sch:rule context="gml:ValueArray">
148
						<sch:assert test="count(gml:valueComponent/*) = count(gml:valueComponent/*[name() = name(../../gml:valueComponent[1]/*[1])])">All components of <sch:name/> shall be of the same type</sch:assert>
149
						<sch:assert test="count(gml:valueComponents/*) = count(gml:valueComponents/*[name() = name(../*[1])])">All components of <sch:name/> shall be of the same type</sch:assert>
150
					</sch:rule>
151
				</sch:pattern>
152
			</appinfo>
153
		</annotation>
154
	</element>
155
	<complexType name="ValueArrayType">
156
		<complexContent>
157
			<extension base="gml:CompositeValueType">
158
				<attributeGroup ref="gml:referenceSystem"/>
159
			</extension>
160
		</complexContent>
161
	</complexType>
162
	<attributeGroup name="referenceSystem">
163
		<attribute name="codeSpace" type="anyURI"/>
164
		<attribute name="uom" type="gml:UomIdentifier"/>
165
	</attributeGroup>
166
	<element name="CategoryExtent" type="gml:CategoryExtentType" substitutionGroup="gml:AbstractValue"/>
167
	<complexType name="CategoryExtentType">
168
		<simpleContent>
169
			<restriction base="gml:CodeOrNilReasonListType">
170
				<length value="2"/>
171
			</restriction>
172
		</simpleContent>
173
	</complexType>
174
	<element name="CountExtent" type="gml:CountExtentType" substitutionGroup="gml:AbstractValue"/>
175
	<simpleType name="CountExtentType">
176
		<restriction base="gml:integerOrNilReasonList">
177
			<length value="2"/>
178
		</restriction>
179
	</simpleType>
180
	<element name="QuantityExtent" type="gml:QuantityExtentType" substitutionGroup="gml:AbstractValue"/>
181
	<complexType name="QuantityExtentType">
182
		<simpleContent>
183
			<restriction base="gml:MeasureOrNilReasonListType">
184
				<length value="2"/>
185
			</restriction>
186
		</simpleContent>
187
	</complexType>
188
	<complexType name="BooleanPropertyType">
189
		<sequence minOccurs="0">
190
			<element ref="gml:Boolean"/>
191
		</sequence>
192
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
193
	</complexType>
194
	<complexType name="CategoryPropertyType">
195
		<sequence minOccurs="0">
196
			<element ref="gml:Category"/>
197
		</sequence>
198
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
199
	</complexType>
200
	<complexType name="QuantityPropertyType">
201
		<sequence minOccurs="0">
202
			<element ref="gml:Quantity"/>
203
		</sequence>
204
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
205
	</complexType>
206
	<complexType name="CountPropertyType">
207
		<sequence minOccurs="0">
208
			<element ref="gml:Count"/>
209
		</sequence>
210
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
211
	</complexType>
212
</schema>