~ubuntu-branches/ubuntu/precise/triplea/precise

« back to all changes in this revision

Viewing changes to data/games/strategy/engine/xml/game.dtd

  • Committer: Package Import Robot
  • Author(s): Scott Howard
  • Date: 2011-11-11 21:40:11 UTC
  • Revision ID: package-import@ubuntu.com-20111111214011-sehf2rwat36o2xqf
Tags: upstream-1.3.2.2
ImportĀ upstreamĀ versionĀ 1.3.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="ISO-8859-1"?>
 
2
 
 
3
<!ELEMENT game (info, loader, diceSides?, map, resourceList?, playerList, unitList?, gamePlay, production?, technology?, attatchmentList? , initialize?, propertyList?)>
 
4
 
 
5
<!-- version must be in the form xx.xx or xx.xx.xx where xx is a positive integer -->
 
6
<!ELEMENT info EMPTY>
 
7
<!ATTLIST info
 
8
        name CDATA #REQUIRED
 
9
        version CDATA #REQUIRED
 
10
>
 
11
 
 
12
<!-- javaClass must implement the IGameLoader interface -->
 
13
<!ELEMENT loader EMPTY>
 
14
<!ATTLIST loader 
 
15
        javaClass CDATA #REQUIRED
 
16
>
 
17
 
 
18
<!-- Number of sides on dice -->
 
19
<!ELEMENT diceSides EMPTY>
 
20
<!ATTLIST diceSides
 
21
        value CDATA #REQUIRED
 
22
>
 
23
 
 
24
<!ELEMENT map ((grid | territory)+ , connection*, remove-connection*)>
 
25
        <!ELEMENT grid EMPTY>
 
26
        <!ATTLIST grid
 
27
                name CDATA #REQUIRED
 
28
                type (square | points-and-lines) #REQUIRED
 
29
                x CDATA #REQUIRED
 
30
                y CDATA #REQUIRED
 
31
                horizontal-connections (explicit | implicit) 'explicit'
 
32
                vertical-connections (explicit | implicit) 'explicit'
 
33
                diagonal-connections (explicit | implicit) 'explicit'
 
34
        >
 
35
 
 
36
        <!ELEMENT territory EMPTY>
 
37
        <!ATTLIST territory
 
38
                name CDATA #REQUIRED
 
39
                water (true | false)  "false"
 
40
        >
 
41
        <!-- connections are two way -->
 
42
        <!ELEMENT connection EMPTY>
 
43
        <!ATTLIST connection
 
44
                t1 CDATA #REQUIRED 
 
45
                t2 CDATA #REQUIRED
 
46
        >
 
47
 
 
48
        <!ELEMENT remove-connection EMPTY>
 
49
        <!ATTLIST remove-connection
 
50
                t1 CDATA #REQUIRED 
 
51
                t2 CDATA #REQUIRED
 
52
        >
 
53
 
 
54
<!ELEMENT resourceList (resource+) >
 
55
        <!ELEMENT resource EMPTY>
 
56
        <!ATTLIST resource 
 
57
                name ID #REQUIRED
 
58
        >
 
59
 
 
60
<!ELEMENT unitList (unit+) >
 
61
        <!ELEMENT unit EMPTY>
 
62
        <!ATTLIST unit 
 
63
                name ID #REQUIRED
 
64
        >
 
65
 
 
66
<!ELEMENT playerList (player+, alliance*) >
 
67
        <!ELEMENT player EMPTY>
 
68
        <!ATTLIST player
 
69
                name ID #REQUIRED
 
70
                optional (true | false) 'false'
 
71
        >
 
72
        <!ELEMENT alliance EMPTY>
 
73
 
 
74
        <!ATTLIST alliance
 
75
                player IDREF #REQUIRED 
 
76
                alliance CDATA #REQUIRED
 
77
        >
 
78
 
 
79
        
 
80
 
 
81
                
 
82
<!ELEMENT gamePlay (delegate+, sequence)>
 
83
        <!ELEMENT delegate EMPTY>
 
84
        <!-- javaClass must implement Delegate
 
85
                 1 instance created per delegate declaration, ie 1 instance per name -->
 
86
        <!ATTLIST delegate
 
87
                name ID #REQUIRED
 
88
                javaClass CDATA #REQUIRED
 
89
                display CDATA #IMPLIED
 
90
        >
 
91
        <!-- if no player given, then delegate is initialized with a null player -->
 
92
        <!-- max run count is the maximum number of times that a delegate can run, if specified must be > 0, if not specified its infinity-->
 
93
        <!ELEMENT sequence (step+)>
 
94
                <!ELEMENT step (stepProperty*)>
 
95
                <!ATTLIST step
 
96
                        name ID #REQUIRED
 
97
                        delegate IDREF #REQUIRED
 
98
                        player IDREF #IMPLIED
 
99
                        maxRunCount CDATA #IMPLIED
 
100
                        display CDATA #IMPLIED
 
101
                >
 
102
                        <!ELEMENT stepProperty EMPTY>
 
103
                        <!ATTLIST stepProperty
 
104
                                name CDATA #REQUIRED
 
105
                                value CDATA #REQUIRED
 
106
                        >
 
107
                
 
108
 
 
109
<!ELEMENT production (productionRule+, repairRule*, repairFrontier*, productionFrontier+, playerProduction+, playerRepair*)>
 
110
        <!ELEMENT productionRule (cost+ , result+)>
 
111
        <!ATTLIST productionRule 
 
112
                name ID #REQUIRED
 
113
        >
 
114
                <!ELEMENT cost EMPTY>
 
115
                <!ATTLIST cost
 
116
                        resource IDREF #REQUIRED
 
117
                        quantity CDATA #REQUIRED
 
118
                >
 
119
                <!ELEMENT result EMPTY>
 
120
                <!ATTLIST result
 
121
                        resourceOrUnit IDREF #REQUIRED
 
122
                        quantity CDATA #REQUIRED
 
123
                >
 
124
                
 
125
        <!ELEMENT repairRule (cost+ , result+)>
 
126
        <!ATTLIST repairRule 
 
127
                name ID #REQUIRED
 
128
        >
 
129
        
 
130
        <!ELEMENT repairFrontier (repairRules+)>
 
131
        <!ATTLIST repairFrontier
 
132
                name ID #REQUIRED
 
133
        >
 
134
                <!ELEMENT repairRules EMPTY>
 
135
                <!ATTLIST repairRules 
 
136
                        name IDREF #REQUIRED
 
137
                >
 
138
        
 
139
        <!ELEMENT productionFrontier (frontierRules+)>
 
140
        <!ATTLIST productionFrontier
 
141
                name ID #REQUIRED
 
142
        >
 
143
                <!ELEMENT frontierRules EMPTY>
 
144
                <!ATTLIST frontierRules 
 
145
                        name IDREF #REQUIRED
 
146
                >
 
147
        <!ELEMENT playerProduction EMPTY>
 
148
        <!ATTLIST playerProduction
 
149
            player IDREF #REQUIRED
 
150
            frontier IDREF #REQUIRED
 
151
        >
 
152
        
 
153
        <!ELEMENT playerRepair EMPTY>
 
154
        <!ATTLIST playerRepair
 
155
            player IDREF #REQUIRED
 
156
            frontier IDREF #REQUIRED
 
157
        >
 
158
        
 
159
<!ELEMENT technology (technologies,playerTech+)>
 
160
        
 
161
        <!ELEMENT technologies (techname+)>
 
162
                <!ELEMENT techname EMPTY>
 
163
                <!ATTLIST techname 
 
164
                        name ID #REQUIRED
 
165
                        tech CDATA ""
 
166
                >
 
167
        <!ELEMENT playerTech (category*)>
 
168
        <!ATTLIST playerTech
 
169
                player IDREF #REQUIRED
 
170
        >
 
171
                <!ELEMENT category (tech*)>
 
172
                <!ATTLIST category 
 
173
                        name CDATA #REQUIRED
 
174
                >
 
175
                        <!ELEMENT tech EMPTY>
 
176
                        <!ATTLIST tech 
 
177
                                name IDREF #REQUIRED
 
178
                        >
 
179
        
 
180
<!-- attatchments must implement Attatchment -->
 
181
<!ELEMENT attatchmentList (attatchment+) >
 
182
        <!ELEMENT attatchment (option+) >
 
183
        <!ATTLIST attatchment 
 
184
                name CDATA #REQUIRED
 
185
                attatchTo CDATA #REQUIRED
 
186
                javaClass CDATA #REQUIRED
 
187
                type (unitType | territory | resource | player)  "unitType"
 
188
        >
 
189
                <!ELEMENT option EMPTY > 
 
190
                <!ATTLIST option
 
191
                        name CDATA #REQUIRED
 
192
                        value CDATA #REQUIRED
 
193
                        count CDATA ""
 
194
                >
 
195
                
 
196
 
 
197
<!ELEMENT initialize (ownerInitialize?, unitInitialize?, resourceInitialize?) >
 
198
        <!ELEMENT ownerInitialize (territoryOwner+) >
 
199
                <!ELEMENT territoryOwner EMPTY>
 
200
                <!ATTLIST territoryOwner 
 
201
                        territory CDATA #REQUIRED
 
202
                        owner IDREF #REQUIRED
 
203
                >
 
204
        <!ELEMENT unitInitialize (unitPlacement*, heldUnits*) >
 
205
                <!-- units are owned by no one if owner isnt set -->
 
206
                <!ELEMENT unitPlacement EMPTY>
 
207
                <!ATTLIST unitPlacement
 
208
                        unitType IDREF #REQUIRED
 
209
                        territory CDATA #REQUIRED
 
210
                        quantity CDATA #REQUIRED
 
211
                        owner IDREF #IMPLIED
 
212
                >
 
213
                <!-- units that have not been placed yet -->
 
214
                <!ELEMENT heldUnits EMPTY>
 
215
                <!ATTLIST heldUnits 
 
216
                        unitType IDREF #REQUIRED
 
217
                        player IDREF #REQUIRED
 
218
                        quantity CDATA #REQUIRED
 
219
                >
 
220
        <!ELEMENT resourceInitialize (resourceGiven+) >
 
221
                <!ELEMENT resourceGiven EMPTY>
 
222
                <!ATTLIST resourceGiven
 
223
                        player IDREF #REQUIRED
 
224
                        resource IDREF #REQUIRED
 
225
                        quantity CDATA #REQUIRED
 
226
                >
 
227
                
 
228
<!ELEMENT propertyList (property*)>
 
229
        <!ELEMENT property (boolean?, string?, file?, number?, color?, list?, value?) >
 
230
        <!-- can the player edit this on start up? if true then the type must be specified with a nested element -->
 
231
        <!ATTLIST property
 
232
                value CDATA ""
 
233
                name CDATA #REQUIRED
 
234
                editable (true | false) "false"
 
235
                player CDATA ""
 
236
        >
 
237
                <!ELEMENT value (#PCDATA)>
 
238
        
 
239
                <!ELEMENT boolean EMPTY>
 
240
                <!ATTLIST boolean
 
241
                >
 
242
                <!ELEMENT string EMPTY>
 
243
                <!ATTLIST string
 
244
                >
 
245
                <!ELEMENT file EMPTY>
 
246
                <!ATTLIST string
 
247
                >
 
248
                <!ELEMENT number EMPTY>
 
249
                <!-- currently only integers are supported -->
 
250
                <!ATTLIST number
 
251
                        max CDATA #REQUIRED
 
252
                        min CDATA #REQUIRED
 
253
                >
 
254
                
 
255
                <!ELEMENT color EMPTY>
 
256
                <!ATTLIST color
 
257
                >
 
258
                
 
259
                <!ELEMENT list EMPTY>
 
260
                <!-- a comma seperated list of possible values -->
 
261
                <!ATTLIST list
 
262
                        values CDATA #REQUIRED
 
263
                >