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:xlink="http://www.w3.org/1999/xlink" 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:gmlBase:3.2.0">gmlBase.xsd</appinfo>
|
5 |
|
|
<appinfo source="urn:ogc:specification:gml:schema-xsd:gmlBase:3.2.0">
|
6 |
|
|
<sch:title>Schematron validation</sch:title>
|
7 |
|
|
<sch:ns prefix="gml" uri="http://www.opengis.net/gml"/>
|
8 |
|
|
<sch:ns prefix="xlink" uri="http://www.w3.org/1999/xlink"/>
|
9 |
|
|
<sch:pattern name="Check either href or content not both">
|
10 |
|
|
<sch:rule abstract="true" id="hrefOrContent">
|
11 |
|
|
<sch:report test="@xlink:href and (*|text())">Property element may not carry both a reference to an object and contain an object.</sch:report>
|
12 |
|
|
<sch:assert test="@xlink:href | (*|text())">Property element must either carry a reference to an object or contain an object.</sch:assert>
|
13 |
|
|
</sch:rule>
|
14 |
|
|
</sch:pattern>
|
15 |
|
|
</appinfo>
|
16 |
|
|
<documentation>See ISO/DIS 19136 7.2.
|
17 |
|
|
The gmlBase schema components establish the GML model and syntax, in particular
|
18 |
|
|
- a root XML type from which XML types for all GML objects should be derived,
|
19 |
|
|
- a pattern and components for GML properties,
|
20 |
|
|
- patterns for collections and arrays, and components for generic collections and arrays,
|
21 |
|
|
- components for associating metadata with GML objects,
|
22 |
|
|
- components for constructing definitions and dictionaries.</documentation>
|
23 |
|
|
</annotation>
|
24 |
|
|
<include schemaLocation="gml_basicTypes.xsd"/>
|
25 |
|
|
<import namespace="http://www.w3.org/1999/xlink" schemaLocation="xlinks.xsd"/>
|
26 |
|
|
<element name="AbstractObject" abstract="true">
|
27 |
|
|
<annotation>
|
28 |
|
|
<documentation>This element has no type defined, and is therefore implicitly (according to the rules of W3C XML Schema) an XML Schema anyType. It is used as the head of an XML Schema substitution group which unifies complex content and certain simple content elements used for datatypes in GML, including the gml:AbstractGML substitution group.</documentation>
|
29 |
|
|
</annotation>
|
30 |
|
|
</element>
|
31 |
|
|
<element name="AbstractGML" type="gml:AbstractGMLType" abstract="true" substitutionGroup="gml:AbstractObject">
|
32 |
|
|
<annotation>
|
33 |
|
|
<documentation>The abstract element gml:AbstractGML is “any GML object having identity”. It acts as the head of an XML Schema substitution group, which may include any element which is a GML feature, or other object, with identity. This is used as a variable in content models in GML core and application schemas. It is effectively an abstract superclass for all GML objects.</documentation>
|
34 |
|
|
</annotation>
|
35 |
|
|
</element>
|
36 |
|
|
<complexType name="AbstractGMLType" abstract="true">
|
37 |
|
|
<sequence>
|
38 |
|
|
<group ref="gml:StandardObjectProperties"/>
|
39 |
|
|
</sequence>
|
40 |
|
|
<attribute ref="gml:id" use="required"/>
|
41 |
|
|
</complexType>
|
42 |
|
|
<group name="StandardObjectProperties">
|
43 |
|
|
<sequence>
|
44 |
|
|
<element ref="gml:metaDataProperty" minOccurs="0" maxOccurs="unbounded"/>
|
45 |
|
|
<element ref="gml:description" minOccurs="0"/>
|
46 |
|
|
<element ref="gml:descriptionReference" minOccurs="0"/>
|
47 |
|
|
<element ref="gml:identifier" minOccurs="0"/>
|
48 |
|
|
<element ref="gml:name" minOccurs="0" maxOccurs="unbounded"/>
|
49 |
|
|
</sequence>
|
50 |
|
|
</group>
|
51 |
|
|
<attributeGroup name="AssociationAttributeGroup">
|
52 |
|
|
<annotation>
|
53 |
|
|
<documentation>XLink components are the standard method to support hypertext referencing in XML. An XML Schema attribute group, gml:AssociationAttributeGroup, is provided to support the use of Xlinks as the method for indicating the value of a property by reference in a uniform manner in GML.</documentation>
|
54 |
|
|
</annotation>
|
55 |
|
|
<attributeGroup ref="xlink:simpleLink"/>
|
56 |
|
|
<attribute name="nilReason" type="gml:NilReasonType"/>
|
57 |
|
|
<attribute ref="gml:remoteSchema"/>
|
58 |
|
|
</attributeGroup>
|
59 |
|
|
<attribute name="remoteSchema" type="anyURI">
|
60 |
|
|
<annotation>
|
61 |
|
|
<appinfo>deprecated</appinfo>
|
62 |
|
|
</annotation>
|
63 |
|
|
</attribute>
|
64 |
|
|
<element name="abstractAssociationRole" type="gml:AssociationRoleType" abstract="true">
|
65 |
|
|
<annotation>
|
66 |
|
|
<documentation>Applying this pattern shall restrict the multiplicity of objects in a property element using this content model to exactly one. An instance of this type shall contain an element representing an object, or serve as a pointer to a remote object.
|
67 |
|
|
Applying the pattern to define an application schema specific property type allows to restrict
|
68 |
|
|
- the inline object to specified object types,
|
69 |
|
|
- the encoding to „by-reference only“ (see 7.2.3.7),
|
70 |
|
|
- the encoding to „inline only“ (see 7.2.3.8).</documentation>
|
71 |
|
|
</annotation>
|
72 |
|
|
</element>
|
73 |
|
|
<complexType name="AssociationRoleType">
|
74 |
|
|
<sequence minOccurs="0">
|
75 |
|
|
<element ref="gml:AbstractObject"/>
|
76 |
|
|
</sequence>
|
77 |
|
|
<attributeGroup ref="gml:OwnershipAttributeGroup"/>
|
78 |
|
|
<attributeGroup ref="gml:AssociationAttributeGroup"/>
|
79 |
|
|
</complexType>
|
80 |
|
|
<attributeGroup name="OwnershipAttributeGroup">
|
81 |
|
|
<annotation>
|
82 |
|
|
<documentation>Encoding a GML property inline vs. by-reference shall not imply anything about the “ownership” of the contained or referenced GML Object, i.e. the encoding style shall not imply any “deep-copy” or “deep-delete” semantics. To express ownership over the contained or referenced GML Object, the gml:OwnershipAttributeGroup attribute group may be added to object-valued property elements. If the attribute group is not part of the content model of such a property element, then the value may not be “owned”.
|
83 |
|
|
When the value of the owns attribute is "true", the existence of inline or referenced object(s) depends upon the existence of the parent object.</documentation>
|
84 |
|
|
</annotation>
|
85 |
|
|
<attribute name="owns" type="boolean" default="false"/>
|
86 |
|
|
</attributeGroup>
|
87 |
|
|
<element name="abstractStrictAssociationRole" type="gml:AssociationRoleType" abstract="true">
|
88 |
|
|
<annotation>
|
89 |
|
|
<documentation>This element shows how an element
|
90 |
|
|
declaration may include a Schematron constraint to limit the property to act
|
91 |
|
|
in either inline or by-reference mode, but not both.</documentation>
|
92 |
|
|
<appinfo>
|
93 |
|
|
<sch:pattern name="refAndContent co-occurence prohibited">
|
94 |
|
|
<sch:rule context="gml:abstractStrictAssociationRole">
|
95 |
|
|
<sch:extends rule="hrefOrContent"/>
|
96 |
|
|
</sch:rule>
|
97 |
|
|
</sch:pattern>
|
98 |
|
|
</appinfo>
|
99 |
|
|
</annotation>
|
100 |
|
|
</element>
|
101 |
|
|
<element name="abstractReference" type="gml:ReferenceType" abstract="true">
|
102 |
|
|
<annotation>
|
103 |
|
|
<documentation>gml:abstractReference may be used as the head of a subtitution group of more specific elements providing a value by-reference.</documentation>
|
104 |
|
|
</annotation>
|
105 |
|
|
</element>
|
106 |
|
|
<complexType name="ReferenceType">
|
107 |
|
|
<annotation>
|
108 |
|
|
<documentation>gml:ReferenceType is intended to be used in application schemas directly, if a property element shall use a “by-reference only” encoding.</documentation>
|
109 |
|
|
</annotation>
|
110 |
|
|
<sequence/>
|
111 |
|
|
<attributeGroup ref="gml:OwnershipAttributeGroup"/>
|
112 |
|
|
<attributeGroup ref="gml:AssociationAttributeGroup"/>
|
113 |
|
|
</complexType>
|
114 |
|
|
<element name="abstractInlineProperty" type="gml:InlinePropertyType" abstract="true">
|
115 |
|
|
<annotation>
|
116 |
|
|
<documentation>gml:abstractInlineProperty may be used as the head of a subtitution group of more specific elements providing a value inline.</documentation>
|
117 |
|
|
</annotation>
|
118 |
|
|
</element>
|
119 |
|
|
<complexType name="InlinePropertyType">
|
120 |
|
|
<sequence>
|
121 |
|
|
<element ref="gml:AbstractObject"/>
|
122 |
|
|
</sequence>
|
123 |
|
|
<attributeGroup ref="gml:OwnershipAttributeGroup"/>
|
124 |
|
|
</complexType>
|
125 |
|
|
<element name="reversePropertyName" type="string">
|
126 |
|
|
<annotation>
|
127 |
|
|
<documentation>If the value of an object property is another object and that object contains also a property for the association between the two objects, then this name of the reverse property may be encoded in a gml:reversePropertyName element in an appinfo annotation of the property element to document the constraint between the two properties. The value of the element shall contain the qualified name of the property element.</documentation>
|
128 |
|
|
</annotation>
|
129 |
|
|
</element>
|
130 |
|
|
<element name="member" type="gml:AssociationRoleType">
|
131 |
|
|
<annotation>
|
132 |
|
|
<appinfo>deprecated</appinfo>
|
133 |
|
|
</annotation>
|
134 |
|
|
</element>
|
135 |
|
|
<complexType name="ArrayAssociationType">
|
136 |
|
|
<annotation>
|
137 |
|
|
<appinfo>deprecated</appinfo>
|
138 |
|
|
</annotation>
|
139 |
|
|
<sequence>
|
140 |
|
|
<element ref="gml:AbstractObject" minOccurs="0" maxOccurs="unbounded"/>
|
141 |
|
|
</sequence>
|
142 |
|
|
<attributeGroup ref="gml:OwnershipAttributeGroup"/>
|
143 |
|
|
</complexType>
|
144 |
|
|
<element name="members" type="gml:ArrayAssociationType">
|
145 |
|
|
<annotation>
|
146 |
|
|
<appinfo>deprecated</appinfo>
|
147 |
|
|
</annotation>
|
148 |
|
|
</element>
|
149 |
|
|
<complexType name="StringOrRefType">
|
150 |
|
|
<annotation>
|
151 |
|
|
<appinfo>deprecated</appinfo>
|
152 |
|
|
</annotation>
|
153 |
|
|
<simpleContent>
|
154 |
|
|
<extension base="string">
|
155 |
|
|
<attributeGroup ref="gml:AssociationAttributeGroup"/>
|
156 |
|
|
</extension>
|
157 |
|
|
</simpleContent>
|
158 |
|
|
</complexType>
|
159 |
|
|
<element name="metaDataProperty" type="gml:MetaDataPropertyType">
|
160 |
|
|
<annotation>
|
161 |
|
|
<appinfo>deprecated</appinfo>
|
162 |
|
|
</annotation>
|
163 |
|
|
</element>
|
164 |
|
|
<element name="description" type="gml:StringOrRefType">
|
165 |
|
|
<annotation>
|
166 |
|
|
<documentation>The value of this property is a text description of the object. gml:description uses gml:StringOrRefType as its content model, so it may contain a simple text string content, or carry a reference to an external description. The use of gml:description to reference an external description has been deprecated and replaced by the gml:descriptionReference property.</documentation>
|
167 |
|
|
</annotation>
|
168 |
|
|
</element>
|
169 |
|
|
<element name="descriptionReference" type="gml:ReferenceType">
|
170 |
|
|
<annotation>
|
171 |
|
|
<documentation>The value of this property is a remote text description of the object. The xlink:href attribute of the gml:descriptionReference property references the external description.</documentation>
|
172 |
|
|
</annotation>
|
173 |
|
|
</element>
|
174 |
|
|
<element name="name" type="gml:CodeType">
|
175 |
|
|
<annotation>
|
176 |
|
|
<documentation>The gml:name property provides a label or identifier for the object, commonly a descriptive name. An object may have several names, typically assigned by different authorities. gml:name uses the gml:CodeType content model. The authority for a name is indicated by the value of its (optional) codeSpace attribute. The name may or may not be unique, as determined by the rules of the organization responsible for the codeSpace. In common usage there will be one name per authority, so a processing application may select the name from its preferred codeSpace.</documentation>
|
177 |
|
|
</annotation>
|
178 |
|
|
</element>
|
179 |
|
|
<element name="identifier" type="gml:CodeWithAuthorityType">
|
180 |
|
|
<annotation>
|
181 |
|
|
<documentation>Often, a special identifier is assigned to an object by the maintaining authority with the intention that it is used in references to the object For such cases, the codeSpace shall be provided. That identifier is usually unique either globally or within an application domain. gml:identifier is a pre-defined property for such identifiers.</documentation>
|
182 |
|
|
</annotation>
|
183 |
|
|
</element>
|
184 |
|
|
<attribute name="id" type="ID">
|
185 |
|
|
<annotation>
|
186 |
|
|
<documentation>The attribute gml:id supports provision of a handle for the XML element representing a GML Object. Its use is mandatory for all GML objects. It is of XML type ID, so is constrained to be unique in the XML document within which it occurs.</documentation>
|
187 |
|
|
</annotation>
|
188 |
|
|
</attribute>
|
189 |
|
|
<complexType name="AbstractMemberType" abstract="true">
|
190 |
|
|
<annotation>
|
191 |
|
|
<documentation>To create a collection of GML Objects that are not all features, a property type shall be derived by extension from gml:AbstractMemberType.
|
192 |
|
|
This abstract property type is intended to be used only in object types where software shall be able to identify that an instance of such an object type is to be interpreted as a collection of objects.
|
193 |
|
|
By default, this abstract property type does not imply any ownership of the objects in the collection. The owns attribute of gml:OwnershipAttributeGroup may be used on a property element instance to assert ownership of an object in the collection. A collection shall not own an object already owned by another object.
|
194 |
|
|
</documentation>
|
195 |
|
|
</annotation>
|
196 |
|
|
<sequence/>
|
197 |
|
|
<attributeGroup ref="gml:OwnershipAttributeGroup"/>
|
198 |
|
|
</complexType>
|
199 |
|
|
<attributeGroup name="AggregationAttributeGroup">
|
200 |
|
|
<annotation>
|
201 |
|
|
<documentation>A GML Object Collection is any GML Object with a property element in its content model whose content model is derived by extension from gml:AbstractMemberType.
|
202 |
|
|
In addition, the complex type describing the content model of the GML Object Collection may also include a reference to the attribute group gml:AggregationAttributeGroup to provide additional information about the semantics of the object collection. This information may be used by applications to group GML objects, and optionally to order and index them.
|
203 |
|
|
The allowed values for the aggregationType attribute are defined by gml:AggregationType. See 8.4 of ISO/IEC 11404:1996 for the meaning of the values in the enumeration.</documentation>
|
204 |
|
|
</annotation>
|
205 |
|
|
<attribute name="aggregationType" type="gml:AggregationType"/>
|
206 |
|
|
</attributeGroup>
|
207 |
|
|
<simpleType name="AggregationType" final="#all">
|
208 |
|
|
<restriction base="string">
|
209 |
|
|
<enumeration value="set"/>
|
210 |
|
|
<enumeration value="bag"/>
|
211 |
|
|
<enumeration value="sequence"/>
|
212 |
|
|
<enumeration value="array"/>
|
213 |
|
|
<enumeration value="record"/>
|
214 |
|
|
<enumeration value="table"/>
|
215 |
|
|
</restriction>
|
216 |
|
|
</simpleType>
|
217 |
|
|
<element name="Bag" type="gml:BagType" substitutionGroup="gml:AbstractGML">
|
218 |
|
|
<annotation>
|
219 |
|
|
<appinfo>deprecated</appinfo>
|
220 |
|
|
</annotation>
|
221 |
|
|
</element>
|
222 |
|
|
<complexType name="BagType">
|
223 |
|
|
<annotation>
|
224 |
|
|
<appinfo>deprecated</appinfo>
|
225 |
|
|
</annotation>
|
226 |
|
|
<complexContent>
|
227 |
|
|
<extension base="gml:AbstractGMLType">
|
228 |
|
|
<sequence>
|
229 |
|
|
<element ref="gml:member" minOccurs="0" maxOccurs="unbounded"/>
|
230 |
|
|
<element ref="gml:members" minOccurs="0"/>
|
231 |
|
|
</sequence>
|
232 |
|
|
</extension>
|
233 |
|
|
</complexContent>
|
234 |
|
|
</complexType>
|
235 |
|
|
<element name="Array" type="gml:ArrayType" substitutionGroup="gml:AbstractGML">
|
236 |
|
|
<annotation>
|
237 |
|
|
<appinfo>deprecated</appinfo>
|
238 |
|
|
</annotation>
|
239 |
|
|
</element>
|
240 |
|
|
<complexType name="ArrayType">
|
241 |
|
|
<annotation>
|
242 |
|
|
<appinfo>deprecated</appinfo>
|
243 |
|
|
</annotation>
|
244 |
|
|
<complexContent>
|
245 |
|
|
<extension base="gml:AbstractGMLType">
|
246 |
|
|
<sequence>
|
247 |
|
|
<element ref="gml:members" minOccurs="0"/>
|
248 |
|
|
</sequence>
|
249 |
|
|
</extension>
|
250 |
|
|
</complexContent>
|
251 |
|
|
</complexType>
|
252 |
|
|
<complexType name="AbstractMetadataPropertyType" abstract="true">
|
253 |
|
|
<annotation>
|
254 |
|
|
<documentation>To associate metadata described by any XML Schema with a GML object, a property element shall be defined whose content model is derived by extension from gml:AbstractMetadataPropertyType.
|
255 |
|
|
The value of such a property shall be metadata. The content model of such a property type, i.e. the metadata application schema shall be specified by the GML Application Schema.
|
256 |
|
|
By default, this abstract property type does not imply any ownership of the metadata. The owns attribute of gml:OwnershipAttributeGroup may be used on a metadata property element instance to assert ownership of the metadata.
|
257 |
|
|
If metadata following the conceptual model of ISO 19115 is to be encoded in a GML document, the corresponding Implementation Specification specified in ISO/TS 19139 shall be used to encode the metadata information.
|
258 |
|
|
</documentation>
|
259 |
|
|
</annotation>
|
260 |
|
|
<sequence/>
|
261 |
|
|
<attributeGroup ref="gml:OwnershipAttributeGroup"/>
|
262 |
|
|
</complexType>
|
263 |
|
|
<complexType name="MetaDataPropertyType">
|
264 |
|
|
<annotation>
|
265 |
|
|
<appinfo>deprecated</appinfo>
|
266 |
|
|
</annotation>
|
267 |
|
|
<sequence minOccurs="0">
|
268 |
|
|
<element ref="gml:AbstractMetaData"/>
|
269 |
|
|
</sequence>
|
270 |
|
|
<attributeGroup ref="gml:AssociationAttributeGroup"/>
|
271 |
|
|
<attribute name="about" type="anyURI"/>
|
272 |
|
|
</complexType>
|
273 |
|
|
<element name="AbstractMetaData" type="gml:AbstractMetaDataType" abstract="true" substitutionGroup="gml:AbstractObject">
|
274 |
|
|
<annotation>
|
275 |
|
|
<appinfo>deprecated</appinfo>
|
276 |
|
|
</annotation>
|
277 |
|
|
</element>
|
278 |
|
|
<complexType name="AbstractMetaDataType" abstract="true" mixed="true">
|
279 |
|
|
<annotation>
|
280 |
|
|
<appinfo>deprecated</appinfo>
|
281 |
|
|
</annotation>
|
282 |
|
|
<sequence/>
|
283 |
|
|
<attribute ref="gml:id"/>
|
284 |
|
|
</complexType>
|
285 |
|
|
<element name="GenericMetaData" type="gml:GenericMetaDataType" substitutionGroup="gml:AbstractMetaData">
|
286 |
|
|
<annotation>
|
287 |
|
|
<appinfo>deprecated</appinfo>
|
288 |
|
|
</annotation>
|
289 |
|
|
</element>
|
290 |
|
|
<complexType name="GenericMetaDataType" mixed="true">
|
291 |
|
|
<annotation>
|
292 |
|
|
<appinfo>deprecated</appinfo>
|
293 |
|
|
</annotation>
|
294 |
|
|
<complexContent mixed="true">
|
295 |
|
|
<extension base="gml:AbstractMetaDataType">
|
296 |
|
|
<sequence>
|
297 |
|
|
<any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
|
298 |
|
|
</sequence>
|
299 |
|
|
</extension>
|
300 |
|
|
</complexContent>
|
301 |
|
|
</complexType>
|
302 |
|
|
<element name="targetElement" type="string"/>
|
303 |
|
|
<element name="associationName" type="string"/>
|
304 |
|
|
<element name="defaultCodeSpace" type="anyURI"/>
|
305 |
|
|
</schema>
|