summaryrefslogtreecommitdiffstats
path: root/kspread/dtd/kspread.dtd
blob: 4c0c740ac8c8af928708253593221ecbb18c5166 (plain)
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
<!--	$Id: kspread.dtd 401205 2005-03-28 09:06:42Z mlaurent $

		This is an XML document type definition (DTD) for the KSpread
		document format.
		Written by Kalle Dalheimer <[email protected]> with (obviously) input from
		KSpread's author Torben Weis <[email protected]>.

		Please report all bugs to Kalle and Torben at the above addresses.

		Note that all tags are in fact lowercase.
-->



<!--	A KSpread document consists of a paper description and a map that
		contains the table data.

		Attributes:

		author:		The document's author
		email:		The document's author's email address
		editor:		The program this file was written with
                syntaxVersion:  Integer version of the syntax. Currently 1.
		mime:		The MIME type (must always have the value application/x-kspread)
-->
<!ELEMENT spreadsheet (paper, locale, areaname, map)>
<!ATTLIST spreadsheet   author CDATA #IMPLIED
                        email  CDATA #IMPLIED
                        editor CDATA #IMPLIED
                        syntaxVersion NMTOKEN #IMPLIED
                        mime   CDATA #FIXED "application/x-kspread">

<!--	Describes the page format. Can have no or one BORDERS child that
		describes the margins.

		Attributes:

		format:			page format, e.g. "A4", "Letter", "Executive" etc.
		orientation:		"Landscape" or "Portrait"
-->
<!ELEMENT paper (BORDERS|HEAD|FOOT)*>
<!ATTLIST paper format CDATA #REQUIRED
                orientation CDATA #REQUIRED>



<!--	Describes the margins of the page.

		Attributes:

		left:			left margin in pixels
		right:			right margin in pixels
		top:			top margin in pixels
		bottom:			bottom margin in pixels
-->
<!ELEMENT borders EMPTY>
<!ATTLIST borders  left   CDATA #REQUIRED
                   right  CDATA #REQUIRED
                   top    CDATA #REQUIRED
                   bottom CDATA #REQUIRED>


<!--	Describes the page header.

		Attributes:

		left:			the text to appear in the upper left
		center:			the text to appear in the upper middle
		right:			the text to appear in the upper right
-->
<!ELEMENT head EMPTY>
<!ATTLIST head  left     CDATA #IMPLIED
                center   CDATA #IMPLIED
                right    CDATA #IMPLIED>


<!--	Describes the page footer.

		Attributes:

		left:			the text to appear in the lower left
		center:			the text to appear in the lower middle
		right:			the text to appear in the lower right
-->
<!ELEMENT foot EMPTY>
<!ATTLIST foot  left    CDATA #IMPLIED
                center  CDATA #IMPLIED
                right   CDATA #IMPLIED>



<!--	Contains locale format.

	Attributes:

        positivePrefixCurrencySymbol:
        negativeMonetarySignPosition:
        negativePrefixCurrencySymbol:
        fracDigits:
        thousandsSeparator:
        dateFormat:
        timeFormat:
        monetaryDecimalSymbol:
        weekStartsMonday:
        currencySymbol:
        negativeSign:
        positiveSign:
        positiveMonetarySignPosition:
        decimalSymbol:
        monetaryThousandsSeparator:
        dateFormatShort:
-->

<!ELEMENT locale EMPTY>
<!ATTLIST locale  positivePrefixCurrencySymbol   CDATA #REQUIRED
                  negativeMonetarySignPosition   CDATA #REQUIRED
                  negativePrefixCurrencySymbol   CDATA #REQUIRED
                  fracDigits                     CDATA #REQUIRED
                  thousandsSeparator             CDATA #REQUIRED
                  dateFormat                     CDATA #REQUIRED
                  timeFormat                     CDATA #REQUIRED
                  monetaryDecimalSymbol          CDATA #REQUIRED
                  weekStartsMonday               CDATA #REQUIRED
                  currencySymbol                 CDATA #REQUIRED
                  negativeSign                   CDATA #REQUIRED
                  positiveSign                   CDATA #REQUIRED
                  positiveMonetarySignPosition   CDATA #REQUIRED
                  decimalSymbol                  CDATA #REQUIRED
                  monetaryThousandsSeparator     CDATA #REQUIRED
                  dateFormatShort                CDATA #REQUIRED>


<!--	Contains the areaname for the various tables.
        Attributes:
        any
-->
<!ELEMENT areaname (reference)*>

<!--	Contains the definition of an area.
        Attributes:
        any
-->
<!ELEMENT reference (tabname,refname,rect)>

<!ELEMENT tabname (#PCDATA)>


<!ELEMENT refname (#PCDATA)>

<!--
	They are two conflicting uses of <rect>

 Use 1:
    Describe the area selected.
        Attributes:

         left-rect   value of the left border
         right-rect  value of the right border
         bottom-rect value of the bottom border
         top-rect    value of the top border

 Use 2:
    Use unknown (### TODO)
        Attributes:
         x          x position
         y          y posution
         w          width
         h          height
-->
<!ELEMENT rect  EMPTY>
<!ATTLIST rect  left-rect      CDATA #IMPLIED
                right-rect     CDATA #IMPLIED
                bottom-rect    CDATA #IMPLIED
                top-rect       CDATA #IMPLIED
                x              CDATA #IMPLIED
                y              CDATA #IMPLIED
                w              CDATA #IMPLIED
                h              CDATA #IMPLIED>

<!--	Contains the table data for the various tables.

	Attributes:
        activeTable allows to set the active table
        markerColumn and markerRow allow to set the active cell
-->
<!ELEMENT map (table)*>
<!ATTLIST map  activeTable    CDATA #IMPLIED
               markerColumn   CDATA #IMPLIED
               markerRow      CDATA #IMPLIED>


<!--	Contains the data in one table or embedded objects.

		Attributes:

		name	               the name of the table
                columnnumber           display column header as number
                borders                show/hide page border (hide = "0", show = "1")
                hide                   hide/show table (hide ="1", show="0")
                hidezero               don't show zero value (hide="1",show="0")
                firstletterupper       Upper first letter (upper="1",nothing="0")
                grid                   show/hide grid on screen (hide="1", show="0")
                printGrid              show/hide grid on printout (hide="1", show="0")
                printCommentIndicator  show/hide comment indicator on printout (hide="1", show="0")
                printFormulaIndicator  show/hide formula indicator on printout (hide="1", show="0")
                printGrid              show/hide grid on printout (hide="1", show="0")
                printGrid              zoom factor on printout (100%="1.0")
                showFormula            show/hide formula
                showFormulaIndicator   show/hide formula indicator on screen (hide="1", show="0")
                printZoom              zoom of the printout ("100" = 100%)
                printPageLimitX        adjust zoom to limit of pages in x direction, 0 = no limit
                printPageLimitY        adjust zoom to limit of pages in y direction, 0 = no limit
                lcmode                 write on LxCx area selected
                autoCalc	       Autorecalc formula
-->
<!ELEMENT table (paper|cell|chart|column|row|printrange-rect|printrepeatcolumns|printrepeatrows)*>
<!ATTLIST table  name                   CDATA #REQUIRED
                 columnnumber           CDATA #REQUIRED
                 borders                CDATA #REQUIRED
                 hide                   CDATA #REQUIRED
                 hidezero               CDATA #REQUIRED
                 firstletterupper       CDATA #REQUIRED
                 grid                   CDATA #REQUIRED
                 printGrid              CDATA #REQUIRED
                 printCommentIndicator  CDATA #REQUIRED
                 printFormulaIndicator  CDATA #REQUIRED
                 showFormula            CDATA #REQUIRED
                 showFormulaIndicator   CDATA #REQUIRED
                 printZoom              CDATA #REQUIRED
                 printPageLimitX        CDATA #REQUIRED
                 printPageLimitY        CDATA #REQUIRED
                 lcmode                 CDATA #REQUIRED
                 borders1.2             CDATA #REQUIRED
                 autoCalc		CDATA #REQUIRED>


<!--	Describes one cell including contents.

		Attributes:

		row	the row number of the cell (starts at 1)
		column	the column number of the cell (starts at 1)
-->
<!ELEMENT cell (text|result|format|validity|condition)*>
<!ATTLIST cell  row      CDATA #REQUIRED
                column   CDATA #REQUIRED>

<!--    Describes the contents of the cell.
        For instance, <text>My string</text> or
	<text>=A4+B5</text>
        Date data is stored in a locale independant way -
          <text>yyyy/mm/dd</text>

        The dataType attribute may be any of "Str", "Bool" "Num", "Date",
        "Time", or "Other".
-->
<!ELEMENT text (#PCDATA)>
<!ATTLIST text dataType CDATA #IMPLIED>


<!--    result - describes the result of a formula
        only found in cells with formulas, and the format is identical
        to a 'text' attribute of a cell with just data.
-->
<!ELEMENT result (#PCDATA)>
<!ATTLIST result dataType CDATA #IMPLIED>

<!--	Describes the format of one cell.

        TODO: describe attributes
-->
<!ELEMENT format (font?,pen?)>
<!ATTLIST format        align            CDATA #REQUIRED
                        alignY           CDATA #REQUIRED
                        bgcolor          CDATA #REQUIRED
                        multirow         CDATA #REQUIRED
                        verticaltext     CDATA #REQUIRED
                        precision        CDATA #REQUIRED
                        prefix           CDATA #REQUIRED
                        postfix          CDATA #REQUIRED
                        float            CDATA #REQUIRED
                        floatcolor       CDATA #REQUIRED
                        faktor           CDATA #REQUIRED
                        format           CDATA #REQUIRED
                        angle            CDATA #REQUIRED
                        brushcolor       CDATA #REQUIRED
                        indent           CDATA #REQUIRED
                        dontprinttext    CDATA #REQUIRED>


<!ELEMENT pen EMPTY>
<!ATTLIST pen           width            CDATA #REQUIRED
                        style            CDATA #REQUIRED
                        color            CDATA #REQUIRED>

<!ELEMENT font EMPTY>
<!ATTLIST font          size             CDATA #REQUIRED
                        family           CDATA #REQUIRED
                        weight           CDATA #REQUIRED>

<!ELEMENT validity  (param,title,message,timemin,timemax,inputtitle,inputmessage)>

<!--	Describes validate format.

		Attributes:
                        valmin  Minimal value of the validate condition
                        cond    type of condition (None, Equal,Superior,Inferior,SuperiorEqual,InferiorEqual,Between,Different, DifferentTo)
                        valmax  Maximal value of the validate condition
                        allow   type of value allows (Allow_All, Allow_Number, Allow_Text,Allow_Time,Allow_Date,Allow_Integer,Allow_TextLength, Allow_List)
                        action  Action executes when it's not validate (Error, warning etc...)
			displaymessage display or not error alert
                        displayvalidationinformation display or not input help
                        allowemptycell allow to have an empty cell
			listvalidity gave list of test allow into cell
-->
<!ELEMENT param EMPTY>
<!ATTLIST param         valmin           CDATA #REQUIRED
                        cond             CDATA #REQUIRED
                        valmax           CDATA #REQUIRED
                        allow            CDATA #REQUIRED
                        action           CDATA #REQUIRED
			displaymessage   CDATA #REQUIRED
                        displayvalidationinformation CDATA #REQUIRED
                        allowemptycell   CDATA #REQUIRED
			listvalidity     CDATA #REQUIRED>

<!ELEMENT title (#PCDATA)>

<!ELEMENT message (#PCDATA)>

<!ELEMENT timemin (#PCDATA)>

<!ELEMENT timemax (#PCDATA)>

<!ELEMENT inputmessage (#PCDATA)>

<!ELEMENT inputtitle (#PCDATA)>

<!--   Describes conditional cell attribut format.
-->
<!ELEMENT condition  (first | second | third)>


<!--	Describes first conditon format.

		Attributes:

                       cond:  Define the condition apply on the cell (NONE, EQUAL etc...)
                       val1:  Inferior value of condition
                       val2:  Superior value of condition
                       color: Color apply when condition is right
-->

<!ELEMENT first (font) >
<!ATTLIST first         cond              CDATA #REQUIRED
                        val1              CDATA #REQUIRED
                        val2              CDATA #REQUIRED
                        color             CDATA #REQUIRED>

<!ELEMENT second (font) >
<!ATTLIST second        cond              CDATA #REQUIRED
                        val1              CDATA #REQUIRED
                        val2              CDATA #REQUIRED
                        color             CDATA #REQUIRED>

<!ELEMENT third (font) >
<!ATTLIST third         cond              CDATA #REQUIRED
                        val1              CDATA #REQUIRED
                        val2              CDATA #REQUIRED
                        color             CDATA #REQUIRED>


<!--	Describes one column

		Attributes:

		column	the column number
		width	the width of the column in points
-->
<!ELEMENT column (format)>
<!ATTLIST column  column  CDATA #REQUIRED
                  width   CDATA #REQUIRED>


<!--	Describes one row

		Attributes:

		row	the row number
		height	the height of the row in points
-->
<!ELEMENT row (format)>
<!ATTLIST row  row  CDATA #REQUIRED
               height   CDATA #REQUIRED>


<!--	Describe the print range.
        Attributes:

         left-rect   value of the left border
         right-rect  value of the right border
         bottom-rect value of the bottom border
         top-rect    value of the top border
-->
<!ELEMENT printrange-rect  EMPTY>
<!ATTLIST printrange-rect  left-rect      CDATA #IMPLIED
                           right-rect     CDATA #IMPLIED
                           bottom-rect    CDATA #IMPLIED
                           top-rect       CDATA #IMPLIED>


<!--	Describe the repeated columns on printout.
        Attributes:

         left   value of the left column
         right  value of the right column
-->
<!ELEMENT printrepeatcolumns  EMPTY>
<!ATTLIST printrepeatcolumns  left      CDATA #IMPLIED
                              right     CDATA #IMPLIED>

<!--	Describe the repeated rows on printout.
        Attributes:

         top     value of the top row
         bottom  value of the bottom row
-->
<!ELEMENT printrepeatrows  EMPTY>
<!ATTLIST printrepeatrows  row        CDATA #IMPLIED
                           bottom     CDATA #IMPLIED>


<!--	Describes an embedded chart.

		Attributes:

		url		the URL of the embedded chart
				(example: "store:/Table 1/0")
		mime	the MIME type of the application that has generated
				the chart
-->
<!ELEMENT chart (rect|binding)*>
<!ATTLIST chart         url     CDATA #REQUIRED
                        mime    CDATA #REQUIRED>

<!ELEMENT binding (rect)>