1 |
bh |
2104 |
<?xml version="1.0" encoding="UTF-8"?> |
2 |
|
|
<!-- thuban-1.1.dtd |
3 |
|
|
|
4 |
bh |
2650 |
Copyright (C) 2001, 2003, 2004, 2005 by Intevation GmbH |
5 |
bh |
2104 |
Authors: |
6 |
jan |
2371 |
Jan-Oliver Wagner <[email protected]> |
7 |
bh |
2104 |
Bernhard Herzog <[email protected]> |
8 |
|
|
|
9 |
|
|
This program is free software under the GPL (>=v2) |
10 |
|
|
Read the file COPYING coming with Thuban for details. |
11 |
|
|
|
12 |
|
|
$Revision$ |
13 |
|
|
$Source$ |
14 |
|
|
$Id$ |
15 |
|
|
--> |
16 |
|
|
|
17 |
|
|
<!-- a session contains zero or more database connections zero or more |
18 |
|
|
datasources and and zero or more maps |
19 |
|
|
|
20 |
|
|
At some point, the namespace attribute will likely be used by Thuban to |
21 |
|
|
identify the version of the file format. |
22 |
|
|
--> |
23 |
|
|
|
24 |
|
|
<!ENTITY % shapesources "fileshapesource | derivedshapesource | dbshapesource"> |
25 |
|
|
<!ENTITY % tables "filetable | jointable"> |
26 |
|
|
<!ELEMENT session ((dbconnection | %shapesources; | %tables; )*, map*)> |
27 |
|
|
<!ATTLIST session |
28 |
|
|
title CDATA #REQUIRED |
29 |
|
|
xmlns CDATA #IMPLIED |
30 |
|
|
> |
31 |
|
|
|
32 |
|
|
|
33 |
|
|
<!-- |
34 |
|
|
A db connection represents the connection to a database. |
35 |
|
|
|
36 |
|
|
Currently only connections to postgis databases are supported and |
37 |
|
|
thus The dbtype attribute must be "postgis". |
38 |
|
|
--> |
39 |
|
|
|
40 |
|
|
<!ELEMENT dbconnection EMPTY> |
41 |
|
|
<!ATTLIST dbconnection |
42 |
|
|
id ID #REQUIRED |
43 |
|
|
dbtype CDATA #REQUIRED |
44 |
|
|
dbname CDATA #REQUIRED |
45 |
|
|
host CDATA "" |
46 |
|
|
port CDATA "" |
47 |
|
|
user CDATA "" |
48 |
|
|
> |
49 |
|
|
|
50 |
|
|
|
51 |
|
|
<!-- A dbshapesource represents a table with geometry data in a database |
52 |
|
|
|
53 |
|
|
The dbconn attribute must be the id of a dbconnection element |
54 |
|
|
occurring earlier in the document. |
55 |
|
|
--> |
56 |
|
|
|
57 |
|
|
<!ELEMENT dbshapesource EMPTY> |
58 |
|
|
<!ATTLIST dbshapesource |
59 |
|
|
id ID #REQUIRED |
60 |
|
|
dbconn IDREF #REQUIRED |
61 |
|
|
tablename CDATA #REQUIRED |
62 |
|
|
id_column CDATA #REQUIRED |
63 |
|
|
geometry_column CDATA #REQUIRED |
64 |
|
|
> |
65 |
|
|
|
66 |
|
|
<!-- |
67 |
|
|
A fileshapesource is a source of shapes and perhaps attribute data |
68 |
|
|
read from a file. The filetype attribute must be one of the |
69 |
|
|
supported file types. Currently only "shapefile" is supported. |
70 |
|
|
--> |
71 |
|
|
|
72 |
|
|
<!ELEMENT fileshapesource EMPTY> |
73 |
|
|
<!ATTLIST fileshapesource |
74 |
|
|
id ID #REQUIRED |
75 |
|
|
filename CDATA #REQUIRED |
76 |
|
|
filetype CDATA #REQUIRED |
77 |
|
|
> |
78 |
|
|
|
79 |
|
|
<!-- |
80 |
|
|
A derivedshapesource is a source of shapes and attribute data |
81 |
|
|
derived from another shapesource for the shapes and a table for the |
82 |
|
|
attribute data. |
83 |
|
|
--> |
84 |
|
|
|
85 |
|
|
<!ELEMENT derivedshapesource EMPTY> |
86 |
|
|
<!ATTLIST derivedshapesource |
87 |
|
|
id ID #REQUIRED |
88 |
|
|
shapesource IDREF #REQUIRED |
89 |
|
|
table IDREF #REQUIRED |
90 |
|
|
> |
91 |
|
|
|
92 |
|
|
|
93 |
|
|
<!-- a filetable points to the actual file that |
94 |
|
|
contains the tabular data. |
95 |
|
|
|
96 |
|
|
The filetype Attribute may be onve of "DBF" or "CSV" |
97 |
|
|
--> |
98 |
|
|
<!ELEMENT filetable EMPTY> |
99 |
|
|
<!ATTLIST filetable |
100 |
|
|
id ID #REQUIRED |
101 |
|
|
title CDATA #REQUIRED |
102 |
|
|
filename CDATA #REQUIRED |
103 |
|
|
filetype CDATA #REQUIRED> |
104 |
|
|
|
105 |
|
|
<!-- |
106 |
|
|
A jointable is a table with the result of something equivalent to |
107 |
|
|
this SQL Statement: |
108 |
|
|
|
109 |
|
|
SELECT * FROM left JOIN right WHERE left.leftcolumn = right.rightcolumn; |
110 |
|
|
|
111 |
|
|
The attributes left and right must be the ids of two tables defined |
112 |
|
|
previously in the XML-Document file. leftcolumn and rightcolumn are |
113 |
|
|
the column names to join on. |
114 |
|
|
|
115 |
|
|
The jointype attribute should be either "INNER" or "LEFT OUTER". |
116 |
|
|
--> |
117 |
|
|
<!ELEMENT jointable EMPTY> |
118 |
|
|
<!ATTLIST jointable |
119 |
|
|
id ID #REQUIRED |
120 |
|
|
title CDATA #REQUIRED |
121 |
|
|
left IDREF #REQUIRED |
122 |
|
|
leftcolumn CDATA #REQUIRED |
123 |
|
|
right IDREF #REQUIRED |
124 |
|
|
rightcolumn CDATA #REQUIRED |
125 |
|
|
jointype CDATA #REQUIRED |
126 |
|
|
> |
127 |
|
|
|
128 |
|
|
<!-- A Map |
129 |
|
|
|
130 |
|
|
A map consists of a number of layers |
131 |
|
|
the projection refers to the projection |
132 |
|
|
used to display the map. If the projection |
133 |
|
|
is missing, geographic coordinates in decimal |
134 |
|
|
degrees are assumed. |
135 |
|
|
--> |
136 |
|
|
<!ELEMENT map (projection?, (layer | rasterlayer)*, labellayer?)> |
137 |
|
|
<!ATTLIST map title CDATA #REQUIRED> |
138 |
|
|
|
139 |
|
|
<!-- a layer represents a set of geographic objects. |
140 |
|
|
pointers to the actual data are stored. |
141 |
|
|
The shapestore attributes contains the id of the data store |
142 |
|
|
shown in the layer. |
143 |
|
|
the projection refers to the projection |
144 |
|
|
in which the data are stored. If the projection |
145 |
|
|
is missing, geographic coordinates in decimal |
146 |
|
|
degrees are assumed. Visibility is assumed true |
147 |
|
|
unless otherwise specified. |
148 |
|
|
--> |
149 |
|
|
<!ELEMENT layer (projection?, classification?)> |
150 |
|
|
<!ATTLIST layer title CDATA #REQUIRED> |
151 |
|
|
<!ATTLIST layer shapestore IDREF #REQUIRED> |
152 |
|
|
<!ATTLIST layer visible (true|false) "true"> |
153 |
|
|
<!-- the fill and stroke attributes can be either "None" or "#RRGGBB" |
154 |
|
|
RGB hex values |
155 |
|
|
|
156 |
jan |
2371 |
All of fill, stroke, stroke_width and size may be omitted and default |
157 |
|
|
to "None", "#000000", "1" and "5" respectively. |
158 |
bh |
2104 |
--> |
159 |
|
|
<!ATTLIST layer fill CDATA "None"> |
160 |
|
|
<!ATTLIST layer stroke CDATA "#000000"> |
161 |
|
|
<!ATTLIST layer stroke_width CDATA "1"> |
162 |
jan |
2371 |
<!ATTLIST layer size CDATA "5"> |
163 |
bh |
2104 |
|
164 |
|
|
|
165 |
|
|
<!-- a rasterlayer represents an image that has some geographic data |
166 |
|
|
associated with it. The filename points to the image used. |
167 |
bh |
2650 |
|
168 |
|
|
The masktype should be one of "none", "bit" or "alpha". |
169 |
|
|
The opacity is the opacity as a decimal floating point number in the |
170 |
|
|
range 0.0 ... 1.0 |
171 |
bh |
2104 |
--> |
172 |
|
|
<!ELEMENT rasterlayer (projection?, classification?)> |
173 |
|
|
<!ATTLIST rasterlayer |
174 |
|
|
title CDATA #REQUIRED |
175 |
|
|
filename CDATA #REQUIRED |
176 |
bh |
2650 |
opacity CDATA #IMPLIED |
177 |
|
|
masktype CDATA #IMPLIED |
178 |
bh |
2104 |
visible (true|false) "true"> |
179 |
|
|
|
180 |
|
|
|
181 |
|
|
<!-- Classification data --> |
182 |
|
|
<!ELEMENT classification (clnull?, clpoint*, clrange*, clcont*)> |
183 |
jan |
2656 |
<!ATTLIST classification field CDATA> |
184 |
|
|
<!ATTLIST classification field_type CDATA> |
185 |
bh |
2104 |
|
186 |
|
|
<!ELEMENT clnull (cldata*)> |
187 |
|
|
<!ELEMENT clpoint (cldata*)> |
188 |
|
|
<!ELEMENT clrange (cldata*)> |
189 |
|
|
<!ELEMENT clcont (cldata*)> |
190 |
|
|
|
191 |
|
|
<!ATTLIST clnull label CDATA #IMPLIED> |
192 |
|
|
|
193 |
|
|
<!ATTLIST clpoint value CDATA #REQUIRED> |
194 |
|
|
<!ATTLIST clpoint label CDATA #IMPLIED> |
195 |
|
|
|
196 |
|
|
<!ATTLIST clrange min CDATA #IMPLIED> |
197 |
|
|
<!ATTLIST clrange max CDATA #IMPLIED> |
198 |
|
|
<!ATTLIST clrange range CDATA #IMPLIED> |
199 |
|
|
<!ATTLIST clrange label CDATA #IMPLIED> |
200 |
|
|
|
201 |
|
|
<!ATTLIST clcont rmin CDATA #REQUIRED> |
202 |
|
|
<!ATTLIST clcont rmax CDATA #REQUIRED> |
203 |
|
|
<!ATTLIST clcont dmin CDATA #REQUIRED> |
204 |
|
|
<!ATTLIST clcont dmax CDATA #REQUIRED> |
205 |
|
|
|
206 |
|
|
<!-- Visual appearance of the classification |
207 |
|
|
|
208 |
|
|
the fill and stroke attributes can be either "None" or "#RRGGBB" |
209 |
|
|
RGB hex values |
210 |
|
|
|
211 |
jan |
2371 |
TODO: Actually, 'size' is only sensible for points. But adding it to |
212 |
|
|
clpoint would not be enough since the 'size' must also be available |
213 |
|
|
for the clnull. And clnull again is applied for lines and polygons. |
214 |
|
|
So, at some later point, maybe with introducing symbols, this |
215 |
|
|
has to be improved. |
216 |
|
|
|
217 |
|
|
All of fill, stroke, stroke_width and size may be omitted and default to |
218 |
|
|
"None", "#000000", "1" and "5" respectively. |
219 |
bh |
2104 |
--> |
220 |
|
|
<!ELEMENT cldata EMPTY> |
221 |
|
|
<!ATTLIST cldata |
222 |
|
|
stroke CDATA #IMPLIED |
223 |
|
|
stroke_width CDATA #IMPLIED |
224 |
|
|
fill CDATA #IMPLIED |
225 |
jan |
2371 |
size CDATA #IMPLIED |
226 |
bh |
2104 |
> |
227 |
|
|
|
228 |
|
|
|
229 |
|
|
<!-- a projection has a number of parameters |
230 |
|
|
--> |
231 |
|
|
<!ELEMENT projection (parameter*)> |
232 |
|
|
<!ATTLIST projection |
233 |
|
|
name CDATA "" |
234 |
|
|
epsg CDATA #IMPLIED > |
235 |
|
|
|
236 |
|
|
<!-- just a simple parameter consisting of a value |
237 |
|
|
--> |
238 |
|
|
<!ELEMENT parameter EMPTY> |
239 |
|
|
<!ATTLIST parameter value CDATA #REQUIRED> |
240 |
|
|
|
241 |
|
|
|
242 |
|
|
<!-- The label layer contains text labels --> |
243 |
|
|
<!ELEMENT labellayer (label*) > |
244 |
|
|
|
245 |
|
|
<!ELEMENT label EMPTY> |
246 |
|
|
<!ATTLIST label |
247 |
|
|
x CDATA #REQUIRED |
248 |
|
|
y CDATA #REQUIRED |
249 |
|
|
text CDATA #REQUIRED |
250 |
|
|
halign (left|center|right) #REQUIRED |
251 |
|
|
valign (top|center|bottom) #REQUIRED> |