-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathschematron.sch
108 lines (108 loc) · 6.46 KB
/
schematron.sch
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
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron">
<sch:ns prefix="gml" uri="http://www.opengis.net/gml/3.2"/>
<!--
- The schematron file implements the validation of the restricted
- subset of GML 3.2 defined in the GML simple features profile
- compliance level SF2. The scope of the validation consists of
- GML document instances. Validation of the restricted subset of
- XML Schema, defined in the same profile document, is not
- implemented by this schematron file.
-->
<sch:pattern id="SF2_Compliance">
<sch:rule context="/*/*/*" id="Metadata">
<!-- Rule to exclude metadataProperty -->
<sch:assert id="metaDataProperty" test="not(gml:metaDataProperty)" >
This profile prohibits use of gml:metaDataProperty
elements for referencing metadata in instance documents.
</sch:assert>
</sch:rule>
<sch:rule context="/*//*" id="Data">
<!-- Rule to exclude spatial topology types -->
<sch:assert id="Spatial_topology_types"
test="not(self::gml:Node|self::gml:Edge|self::gml:Face|self::gml:TopoSolid|self::gml:TopoPoint|self::gml:TopoCurve|self::gml:TopoSurface|self::gml:TopoVolume|self::gml:TopoComplex)">
Spatial properties are limited to the set of geometric
types consisting of point, curve with linear and/or
circular arc interpolation, planar surface, or aggregates
thereof. Spatial topology is excluded.
</sch:assert>
<!-- Rule for content of curves -->
<sch:assert id="Curves"
test="not(self::gml:Curve) or self::gml:Curve/gml:segments[gml:LineStringSegment|gml:Arc|gml:Circle|gml:CircleByCenterPoint]">
Curves (standalone or within surfaces) must have linear
and/or circular arc interpolation (LineString, Curve with
Arc, Circle or CircleByCenterpoint segments)
</sch:assert>
<!-- Rule for constraints on planar surfaces -->
<sch:assert id="Planar_surfaces"
test="not(self::gml:OrientableSurface|self::gml:CompositeSurface|self::gml:PolyhedralSurface|self::gml:Tin|self::gml:TriangulatedSurface)">
Planar surface types are restricted to Polygon or Surface
elements.
</sch:assert>
<!-- Rule for constraints on GeometryPropertyType -->
<sch:assert id="Geometry_types"
test="not(self::gml:Solid|self::gml:MultiSolid|self::gml:CompositeSolid|self::gml:CompositeCurve|self::gml:Grid)">
Supported geometry types are restricted to point, curve with
linear and/or circular arc interpolation, planar surface,
or aggregates thereof.
</sch:assert>
<!-- Rule for geometry coordinates of points and circles by
centerpoint -->
<sch:assert id="Points" test="count(self::gml:Point/gml:pos) = count(self::gml:Point/*)">
Geometry coordinates shall only be specified using the gml:pos element for
gml:Point.
</sch:assert>
<sch:assert id="CircleByCenterPoint"
test="count(self::gml:CircleByCenterPoint/gml:pos|self::gml:CircleByCenterPoint/gml:radius) = count(self::gml:CircleByCenterPoint/*)">
Geometry coordinates shall only be specified using the gml:pos
element for gml:CircleByCenterPoint.
</sch:assert>
<!-- Rules for geometry coordinates in geometries other than points -->
<sch:assert id="LineStrings" test="count(self::gml:LineStringSegment/gml:posList) =
count(self::gml:LineStringSegment/*)">
Geometry coordinates shall only be specified using the gml:posList
element for gml:LineStringSegment.
</sch:assert>
<sch:assert id="LinearRing" test="count(self::gml:LinearRing/gml:posList) =
count(self::gml:LinearRing/*)">
Geometry coordinates shall only be specified using the gml:posList
element for gml:LinearRing.
</sch:assert>
<sch:assert id="Arc" test="count(self::gml:Arc/gml:posList) = count(self::gml:Arc/*)">
Geometry coordinates shall only be specified using the gml:posList
element for gml:Arc.
</sch:assert>
<sch:assert id="Circle" test="count(self::gml:Circle/gml:posList) =
count(self::gml:Circle/*)">
Geometry coordinates shall only be specified using the gml:posList
element for gml:Circle.
</sch:assert>
<!-- Rules for aggregate geometry types -->
<sch:assert id="MultiPoint" test="not(self::gml:MultiPoint/gml:pointMembers)">
This profile restricts instance documents to using the property
container gml:pointMember for the MultiPoint geometry type.
</sch:assert>
<sch:assert id="MulitCurve" test="not(self::gml:MultiCurve/gml:curveMembers)">
This profile restricts instance documents to using the property
container gml:curveMember for the MultiCurve geometry type.
</sch:assert>
<sch:assert id="MultiSurface" test="not(self::gml:MultiSurface/gml:surfaceMembers)">
This profile restricts instance documents to using the property
container gml:surfaceMember for the MultiSurface geometry type.
</sch:assert>
<sch:assert id="MultiGeometry" test="not(self::gml:MultiGeometry/gml:geometryMembers)">
This profile restricts instance documents to using the property
container gml:geometryMember for the MultiGeometry geometry type.
</sch:assert>
<!-- Rule for content of surfaces -->
<sch:assert id="Surface" test="count(self::gml:Surface/gml:patches/gml:PolygonPatch) =
count(self::gml:Surface/gml:patches/*)">
The content of gml:Surface elements is restricted to
gml:PolygonPatch patches.
</sch:assert>
<sch:assert id="Dimension" test="not(self::*/@srsDimension > 3)">
Coordinate reference systems may have 1, 2 or 3 dimensions.
</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>