1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 |
<!-- thuban-0.9.dtd |
3 |
|
4 |
Copyright (C) 2001, 2003 by Intevation GmbH |
5 |
Authors: |
6 |
Jan-Oliver Wagner <[email protected]> |
7 |
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 |
|
13 |
<!-- a session contains zero or more datasources and and zero or more maps |
14 |
|
15 |
At some point, the namespace attribute will likely be used by Thuban to |
16 |
identify the version of the file format. |
17 |
--> |
18 |
|
19 |
<!ENTITY % shapesources "fileshapesource | derivedshapesource"> |
20 |
<!ENTITY % tables "filetable | jointable"> |
21 |
<!ELEMENT session ((%shapesources; | %tables; )*, map*)> |
22 |
<!ATTLIST session |
23 |
title CDATA #REQUIRED |
24 |
xmlns CDATA #IMPLIED |
25 |
> |
26 |
|
27 |
|
28 |
<!-- |
29 |
A fileshapesource is a source of shapes and perhaps attribute data |
30 |
read from a file. The filetype attribute must be one of the |
31 |
supported file types. Currently only "shapefile" is supported. |
32 |
--> |
33 |
|
34 |
<!ELEMENT fileshapesource EMPTY> |
35 |
<!ATTLIST fileshapesource |
36 |
id ID #REQUIRED |
37 |
filename CDATA #REQUIRED |
38 |
filetype CDATA #REQUIRED |
39 |
> |
40 |
|
41 |
<!-- |
42 |
A derivedshapesource is a source of shapes and attribute data |
43 |
derived from another shapesource for the shapes and a table for the |
44 |
attribute data. |
45 |
--> |
46 |
|
47 |
<!ELEMENT derivedshapesource EMPTY> |
48 |
<!ATTLIST derivedshapesource |
49 |
id ID #REQUIRED |
50 |
shapesource IDREF #REQUIRED |
51 |
table IDREF #REQUIRED |
52 |
> |
53 |
|
54 |
|
55 |
<!-- a filetable points to the actual file that |
56 |
contains the tabular data. |
57 |
|
58 |
The filetype Attribute may be onve of "DBF" or "CSV" |
59 |
--> |
60 |
<!ELEMENT filetable EMPTY> |
61 |
<!ATTLIST filetable |
62 |
id ID #REQUIRED |
63 |
title CDATA #REQUIRED |
64 |
filename CDATA #REQUIRED |
65 |
filetype CDATA #REQUIRED> |
66 |
|
67 |
<!-- |
68 |
A jointable is a table with the result of something equivalent to |
69 |
this SQL Statement: |
70 |
|
71 |
SELECT * FROM left JOIN right WHERE left.leftcolumn = right.rightcolumn; |
72 |
|
73 |
The attributes left and right must be the ids of two tables defined |
74 |
previously in the XML-Document file. leftcolumn and rightcolumn are |
75 |
the column names to join on. |
76 |
|
77 |
The jointype attribute should be either "INNER" or "LEFT OUTER". |
78 |
--> |
79 |
<!ELEMENT jointable EMPTY> |
80 |
<!ATTLIST jointable |
81 |
id ID #REQUIRED |
82 |
title CDATA #REQUIRED |
83 |
left IDREF #REQUIRED |
84 |
leftcolumn CDATA #REQUIRED |
85 |
right IDREF #REQUIRED |
86 |
rightcolumn CDATA #REQUIRED |
87 |
jointype CDATA #REQUIRED |
88 |
> |
89 |
|
90 |
<!-- A Map |
91 |
|
92 |
A map consists of a number of layers |
93 |
the projection refers to the projection |
94 |
used to display the map. If the projection |
95 |
is missing, geographic coordinates in decimal |
96 |
degrees are assumed. |
97 |
--> |
98 |
<!ELEMENT map (projection?, (layer | rasterlayer)*, labellayer?)> |
99 |
<!ATTLIST map title CDATA #REQUIRED> |
100 |
|
101 |
<!-- a layer represents a set of geographic objects. |
102 |
pointers to the actual data are stored. |
103 |
The shapestore attributes contains the id of the data store |
104 |
shown in the layer. |
105 |
the projection refers to the projection |
106 |
in which the data are stored. If the projection |
107 |
is missing, geographic coordinates in decimal |
108 |
degrees are assumed. Visibility is assumed true |
109 |
unless otherwise specified. |
110 |
--> |
111 |
<!ELEMENT layer (projection?, classification?)> |
112 |
<!ATTLIST layer title CDATA #REQUIRED> |
113 |
<!ATTLIST layer shapestore IDREF #REQUIRED> |
114 |
<!ATTLIST layer visible (true|false) "true"> |
115 |
<!-- the fill and stroke attributes can be either "None" or "#RRGGBB" |
116 |
RGB hex values |
117 |
|
118 |
All of fill, stroke and stroke_width may be omitted and default to |
119 |
"None", "#000000" and "1" respectively. |
120 |
--> |
121 |
<!ATTLIST layer fill CDATA "None"> |
122 |
<!ATTLIST layer stroke CDATA "#000000"> |
123 |
<!ATTLIST layer stroke_width CDATA "1"> |
124 |
|
125 |
|
126 |
<!-- a rasterlayer represents an image that has some geographic data |
127 |
associated with it. The filename points to the image used. |
128 |
--> |
129 |
<!ELEMENT rasterlayer (projection?, classification?)> |
130 |
<!ATTLIST rasterlayer |
131 |
title CDATA #REQUIRED |
132 |
filename CDATA #REQUIRED |
133 |
visible (true|false) "true"> |
134 |
|
135 |
|
136 |
<!-- Classification data --> |
137 |
<!ELEMENT classification (clnull?, clpoint*, clrange*, clcont*)> |
138 |
<!ATTLIST classification field CDATA #REQUIRED> |
139 |
<!ATTLIST classification field_type CDATA #REQUIRED> |
140 |
|
141 |
<!ELEMENT clnull (cldata*)> |
142 |
<!ELEMENT clpoint (cldata*)> |
143 |
<!ELEMENT clrange (cldata*)> |
144 |
<!ELEMENT clcont (cldata*)> |
145 |
|
146 |
<!ATTLIST clnull label CDATA #IMPLIED> |
147 |
|
148 |
<!ATTLIST clpoint value CDATA #REQUIRED> |
149 |
<!ATTLIST clpoint label CDATA #IMPLIED> |
150 |
|
151 |
<!ATTLIST clrange min CDATA #IMPLIED> |
152 |
<!ATTLIST clrange max CDATA #IMPLIED> |
153 |
<!ATTLIST clrange range CDATA #IMPLIED> |
154 |
<!ATTLIST clrange label CDATA #IMPLIED> |
155 |
|
156 |
<!ATTLIST clcont rmin CDATA #REQUIRED> |
157 |
<!ATTLIST clcont rmax CDATA #REQUIRED> |
158 |
<!ATTLIST clcont dmin CDATA #REQUIRED> |
159 |
<!ATTLIST clcont dmax CDATA #REQUIRED> |
160 |
|
161 |
<!-- Visual appearance of the classification |
162 |
|
163 |
the fill and stroke attributes can be either "None" or "#RRGGBB" |
164 |
RGB hex values |
165 |
|
166 |
All of fill, stroke and stroke_width may be omitted and default to |
167 |
"None", "#000000" and "1" respectively. |
168 |
--> |
169 |
<!ELEMENT cldata EMPTY> |
170 |
<!ATTLIST cldata |
171 |
stroke CDATA #IMPLIED |
172 |
stroke_width CDATA #IMPLIED |
173 |
fill CDATA #IMPLIED |
174 |
> |
175 |
|
176 |
|
177 |
<!-- a projection has a number of parameters |
178 |
--> |
179 |
<!ELEMENT projection (parameter*)> |
180 |
<!ATTLIST projection |
181 |
name CDATA "" > |
182 |
|
183 |
<!-- just a simple parameter consisting of a value |
184 |
--> |
185 |
<!ELEMENT parameter EMPTY> |
186 |
<!ATTLIST parameter value CDATA #REQUIRED> |
187 |
|
188 |
|
189 |
<!-- The label layer contains text labels --> |
190 |
<!ELEMENT labellayer (label*) > |
191 |
|
192 |
<!ELEMENT label EMPTY> |
193 |
<!ATTLIST label |
194 |
x CDATA #REQUIRED |
195 |
y CDATA #REQUIRED |
196 |
text CDATA #REQUIRED |
197 |
halign (left|center|right) #REQUIRED |
198 |
valign (top|center|bottom) #REQUIRED> |