-
Notifications
You must be signed in to change notification settings - Fork 0
/
project_explorer.xsd
98 lines (89 loc) · 3.98 KB
/
project_explorer.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
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- Overall Structure -->
<xs:element name="Project">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="Name"/>
<xs:element type="xs:string" name="Description" minOccurs="0"/>
<xs:element type="xs:string" name="ProjectType" minOccurs="1" maxOccurs="1"/>
<xs:element type="NodeType" name="Node"/>
<xs:element type="ViewsType" name="Views" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<!--Allowable things to add to the map-->
<xs:simpleType name="datatype">
<xs:restriction base="xs:string">
<xs:enumeration value="point" />
<xs:enumeration value="line" />
<xs:enumeration value="polygon" />
<xs:enumeration value="raster" />
<xs:enumeration value="file" />
<xs:enumeration value="report" />
<xs:enumeration value="tin" />
</xs:restriction>
</xs:simpleType>
<!-- Node: A one-off tree branch that has an xpath -->
<xs:complexType name="NodeType">
<xs:sequence>
<xs:element type="xs:string" name="Tileservice" minOccurs="0"/>
<xs:element type="ChildrenType" name="Children" minOccurs="0"/>
</xs:sequence>
<xs:attribute type="xs:string" name="label" use="optional"/>
<xs:attribute type="xs:string" name="xpathlabel" use="optional"/>
<xs:attribute type="xs:string" name="xpath" use="optional"/>
<xs:attribute type="xs:string" name="filter" use="optional"/>
<xs:attribute type="datatype" name="type" use="optional"/>
<xs:attribute type="xs:string" name="symbology" use="optional"/>
<xs:attribute type="xs:integer" name="transparency" use="optional" />
<xs:attribute type="xs:string" name="id" use="optional"/>
</xs:complexType>
<!-- Repeaters: loop over xml node "arrays" -->
<xs:complexType name="RepeaterType">
<xs:sequence>
<xs:choice>
<xs:element type="NodeType" name="Node" maxOccurs="1"/>
</xs:choice>
</xs:sequence>
<xs:attribute type="xs:string" name="label" use="optional"/>
<xs:attribute type="xs:string" name="xpathlabel" use="optional"/>
<xs:attribute type="xs:string" name="xpath" use="required"/>
<xs:attribute type="xs:boolean" name="collapsed" use="optional"/>
</xs:complexType>
<!--Children is basically just a bucket that can contain nodes and repeaters-->
<xs:complexType name="ChildrenType">
<xs:choice maxOccurs="unbounded">
<xs:element type="NodeType" name="Node" minOccurs="1" maxOccurs="unbounded"/>
<xs:element type="RepeaterType" name="Repeater" minOccurs="1" maxOccurs="unbounded"/>
</xs:choice>
<xs:attribute type="xs:boolean" name="collapsed" use="optional"/>
</xs:complexType>
<!-- There can be one Views node that contains many views-->
<xs:complexType name="ViewsType">
<xs:sequence>
<xs:element type="ViewType" name="View" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute type="xs:string" name="default" use="optional"/>
</xs:complexType>
<!-- Each view is a sequence of layers-->
<xs:complexType name="ViewType">
<xs:sequence>
<xs:element type="xs:string" name="Description" minOccurs="0"/>
<xs:element type="LayersType" name="Layers" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
<xs:attribute type="xs:string" name="name" use="required" />
<xs:attribute type="xs:string" name="id" use="required" />
</xs:complexType>
<!-- Layers gets its own container -->
<xs:complexType name="LayersType">
<xs:sequence>
<xs:element type="LayerType" name="Layer" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<!-- Each layer refers to a node by id and determins if the layer should be turned "on" and visible in the map-->
<xs:complexType name="LayerType">
<xs:attribute type="xs:string" name="id" use="required"/>
<xs:attribute type="xs:boolean" name="visible" use="optional"/>
</xs:complexType>
</xs:schema>