1<!--
2
3  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
5  Copyright 2000, 2010 Oracle and/or its affiliates.
6
7  OpenOffice.org - a multi-platform office productivity suite
8
9  This file is part of OpenOffice.org.
10
11  OpenOffice.org is free software: you can redistribute it and/or modify
12  it under the terms of the GNU Lesser General Public License version 3
13  only, as published by the Free Software Foundation.
14
15  OpenOffice.org is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  GNU Lesser General Public License version 3 for more details
19  (a copy is included in the LICENSE file that accompanied this code).
20
21  You should have received a copy of the GNU Lesser General Public License
22  version 3 along with OpenOffice.org.  If not, see
23  <http://www.openoffice.org/license.html>
24  for a copy of the LGPLv3 License.
25
26-->
27
28<!ELEMENT table:calculation-settings (table:null-date?, table:iteration?)>
29<!ATTLIST table:calculation-settings
30	table:case-sensitive %boolean; "true"
31	table:precision-as-shown %boolean; "false"
32	table:search-criteria-must-apply-to-whole-cell %boolean; "true"
33	table:automatic-find-labels %boolean; "true"
34	table:use-regular-expressions %boolean; "true"
35	table:null-year %positiveInteger; "1930"
36>
37<!ELEMENT table:null-date EMPTY>
38<!ATTLIST table:null-date
39	table:value-type %valueType; #FIXED "date"
40	table:date-value %date; "1899-12-30"
41>
42<!ELEMENT table:iteration EMPTY>
43<!ATTLIST table:iteration
44	table:status (enable | disable) "disable"
45	table:steps %positiveInteger; "100"
46	table:maximum-difference %float; "0.001"
47>
48
49<!ELEMENT table:tracked-changes (table:cell-content-change | table:insertion | table:deletion | table:movement | table:rejection)*>
50<!ATTLIST table:tracked-changes table:track-changes %boolean; "true"
51				table:protected %boolean; "false"
52				table:protection-key CDATA #IMPLIED
53>
54
55<!ELEMENT table:dependences (table:dependence)+>
56<!ELEMENT table:dependence EMPTY>
57<!ATTLIST table:dependence
58	table:id CDATA #REQUIRED
59>
60<!ELEMENT table:deletions (table:cell-content-deletion | table:change-deletion)+>
61<!ELEMENT table:cell-content-deletion (table:cell-address?, table:change-track-table-cell?)>
62<!ATTLIST table:cell-content-deletion
63	table:id CDATA #IMPLIED
64>
65<!ELEMENT table:change-deletion EMPTY>
66<!ATTLIST table:change-deletion
67	table:id CDATA #IMPLIED
68>
69<!ELEMENT table:insertion (office:change-info, table:dependences?, table:deletions?)>
70<!ATTLIST table:insertion
71	table:id CDATA #REQUIRED
72	table:acceptance-state (accepted | rejected | pending) "pending"
73	table:rejecting-change-id %positiveInteger; #IMPLIED
74	table:type (row | column | table) #REQUIRED
75	table:position %integer; #REQUIRED
76	table:count %positiveInteger; "1"
77	table:table %integer; #IMPLIED
78>
79<!ELEMENT table:deletion (office:change-info, table:dependences?, table:deletions?, table:cut-offs?)>
80<!ATTLIST table:deletion
81	table:id CDATA #REQUIRED
82	table:acceptance-state (accepted | rejected | pending) "pending"
83	table:rejecting-change-id %positiveInteger; #IMPLIED
84	table:type (row | column | table) #REQUIRED
85	table:position %integer; #REQUIRED
86	table:count %positiveInteger; "1"
87	table:table %integer; #IMPLIED
88	table:multi-deletion-spanned %integer; #IMPLIED
89>
90<!ELEMENT table:cut-offs (table:movement-cut-off+ | (table:insertion-cut-off, table:movement-cut-off*))>
91<!ELEMENT table:insertion-cut-off EMPTY>
92<!ATTLIST table:insertion-cut-off
93	table:id CDATA #REQUIRED
94	table:position %integer; #REQUIRED
95>
96<!ELEMENT table:movement-cut-off EMPTY>
97<!ATTLIST table:movement-cut-off
98	table:id CDATA #REQUIRED
99	table:start-position %integer; #IMPLIED
100	table:end-position %integer; #IMPLIED
101	table:position %integer; #IMPLIED
102>
103<!ELEMENT table:movement (table:source-range-address, table:target-range-address, office:change-info, table:dependences?, table:deletions?)>
104<!ATTLIST table:movement
105	table:id CDATA #REQUIRED
106	table:acceptance-state (accepted | rejected | pending) "pending"
107	table:rejecting-change-id %positiveInteger; #IMPLIED
108>
109<!ELEMENT table:target-range-address EMPTY>
110<!ATTLIST table:target-range-address
111	table:column %integer; #IMPLIED
112	table:row %integer; #IMPLIED
113	table:table %integer; #IMPLIED
114	table:start-column %integer; #IMPLIED
115	table:start-row %integer; #IMPLIED
116	table:start-table %integer; #IMPLIED
117	table:end-column %integer; #IMPLIED
118	table:end-row %integer; #IMPLIED
119	table:end-table %integer; #IMPLIED
120>
121<!ELEMENT table:source-range-address EMPTY>
122<!ATTLIST table:source-range-address
123	table:column %integer; #IMPLIED
124	table:row %integer; #IMPLIED
125	table:table %integer; #IMPLIED
126	table:start-column %integer; #IMPLIED
127	table:start-row %integer; #IMPLIED
128	table:start-table %integer; #IMPLIED
129	table:end-column %integer; #IMPLIED
130	table:end-row %integer; #IMPLIED
131	table:end-table %integer; #IMPLIED
132>
133<!ELEMENT table:change-track-table-cell (text:p*)>
134<!ATTLIST table:change-track-table-cell
135	table:cell-address %cell-address; #IMPLIED
136	table:matrix-covered (true | false) "false"
137	table:formula %string; #IMPLIED
138	table:number-matrix-rows-spanned %positiveInteger; #IMPLIED
139	table:number-matrix-columns-spanned %positiveInteger; #IMPLIED
140	table:value-type %valueType; "string"
141	table:value %float; #IMPLIED
142	table:date-value %date; #IMPLIED
143	table:time-value %timeInstance; #IMPLIED
144	table:string-value %string; #IMPLIED
145>
146<!ELEMENT table:cell-content-change (table:cell-address, office:change-info, table:dependences?, table:deletions?, table:previous)>
147<!ATTLIST table:cell-content-change
148	table:id CDATA #REQUIRED
149	table:acceptance-state (accepted | rejected | pending) "pending"
150	table:rejecting-change-id %positiveInteger; #IMPLIED
151>
152<!ELEMENT table:cell-address EMPTY>
153<!ATTLIST table:cell-address
154	table:column %integer; #IMPLIED
155	table:row %integer; #IMPLIED
156	table:table %integer; #IMPLIED
157>
158<!ELEMENT table:previous (table:change-track-table-cell)>
159<!ATTLIST table:previous
160	table:id CDATA #IMPLIED
161>
162<!ELEMENT table:rejection (office:change-info, table:dependences?, table:deletions?)>
163<!ATTLIST table:rejection
164	table:id CDATA #REQUIRED
165	table:acceptance-state (accepted | rejected | pending) "pending"
166	table:rejecting-change-id %positiveInteger; #IMPLIED
167>
168
169<!ENTITY % table-columns "table:table-columns | ( table:table-column | table:table-column-group )+">
170<!ENTITY % table-header-columns "table:table-header-columns">
171<!ENTITY % table-rows "table:table-rows | ( table:table-row | table:table-row-group )+">
172<!ENTITY % table-header-rows "table:table-header-rows">
173<!ENTITY % table-column-groups "((%table-columns;),(%table-header-columns;,(%table-columns;)?)?) | (%table-header-columns;,(%table-columns;)?)">
174<!ENTITY % table-row-groups "((%table-rows;),(%table-header-rows;,(%table-rows;)?)?) | (%table-header-rows;,(%table-rows;)?)">
175<!ELEMENT table:table (table:table-source?, table:scenario?, office:forms?, table:shapes?, (%table-column-groups;), (%table-row-groups;))>
176<!ATTLIST table:table
177	table:name %string; #IMPLIED
178	table:style-name %styleName; #IMPLIED
179	table:protected %boolean; "false"
180	table:protection-key CDATA #IMPLIED
181	table:print-ranges %cell-range-address-list; #IMPLIED
182>
183<!ELEMENT table:table-source EMPTY>
184<!ATTLIST table:table-source
185	table:mode (copy-all | copy-results-only) "copy-all"
186	xlink:type (simple) #FIXED "simple"
187	xlink:actuate (onRequest) "onRequest"
188	xlink:href %uriReference; #REQUIRED
189	table:filter-name CDATA #IMPLIED
190	table:table-name CDATA #IMPLIED
191	table:filter-options CDATA #IMPLIED
192	table:refresh-delay %timeDuration; #IMPLIED
193>
194<!ELEMENT table:scenario EMPTY>
195<!ATTLIST table:scenario
196	table:display-border %boolean; "true"
197	table:border-color %color; #IMPLIED
198	table:copy-back %boolean; "true"
199	table:copy-styles %boolean; "true"
200	table:copy-formulas %boolean; "true"
201	table:is-active %boolean; #REQUIRED
202	table:scenario-ranges %cell-range-address-list; #REQUIRED
203	table:comment CDATA #IMPLIED
204>
205<!ELEMENT table:shapes %shapes;>
206<!ELEMENT table:table-column-group (table:table-header-columns | table:table-column | table:table-column-group)+>
207<!ATTLIST table:table-column-group
208	table:display %boolean; "true"
209>
210<!ELEMENT table:table-header-columns (table:table-column | table:table-column-group)+>
211<!ELEMENT table:table-columns (table:table-column | table:table-column-group)+>
212<!ELEMENT table:table-column EMPTY>
213<!ATTLIST table:table-column
214	table:number-columns-repeated %positiveInteger; "1"
215	table:style-name %styleName; #IMPLIED
216	table:visibility (visible | collapse | filter) "visible"
217	table:default-cell-style-name %styleName; #IMPLIED
218>
219<!ELEMENT table:table-row-group (table:table-header-rows | table:table-row | table:table-row-group)+>
220<!ATTLIST table:table-row-group
221	table:display %boolean; "true"
222>
223<!ELEMENT table:table-header-rows (table:table-row | table:table-row-group)+>
224<!ELEMENT table:table-rows (table:table-row | table:table-row-group)+>
225<!ENTITY % table-cells "(table:table-cell|table:covered-table-cell)+">
226<!ELEMENT table:table-row %table-cells;>
227<!ATTLIST table:table-row
228	table:number-rows-repeated %positiveInteger; "1"
229	table:style-name %styleName; #IMPLIED
230	table:visibility (visible | collapse | filter) "visible"
231	table:default-cell-style-name %styleName; #IMPLIED
232>
233
234<!ENTITY % text-wo-table "(text:h|text:p|text:ordered-list|text:unordered-list|%shapes;)*">
235<!ENTITY % cell-content "(table:cell-range-source?,office:annotation?,table:detective?,(table:sub-table|%text-wo-table;))">
236<!ELEMENT table:table-cell %cell-content;>
237<!ELEMENT table:covered-table-cell %cell-content;>
238<!ATTLIST table:table-cell
239	table:number-columns-repeated %positiveInteger; "1"
240	table:number-rows-spanned %positiveInteger; "1"
241	table:number-columns-spanned %positiveInteger; "1"
242	table:style-name %styleName; #IMPLIED
243	table:validation-name CDATA #IMPLIED
244	table:formula %string; #IMPLIED
245	table:number-matrix-rows-spanned %positiveInteger; #IMPLIED
246	table:number-matrix-columns-spanned %positiveInteger; #IMPLIED
247	table:value-type %valueType; "string"
248	table:value %float; #IMPLIED
249	table:date-value %date; #IMPLIED
250	table:time-value %timeInstance; #IMPLIED
251	table:boolean-value %boolean; #IMPLIED
252	table:string-value %string; #IMPLIED
253	table:currency %string; #IMPLIED
254>
255<!ATTLIST table:covered-table-cell
256	table:number-columns-repeated %positiveInteger; "1"
257	table:style-name %styleName; #IMPLIED
258	table:validation-name CDATA #IMPLIED
259	table:formula %string; #IMPLIED
260	table:number-matrix-rows-spanned %positiveInteger; #IMPLIED
261	table:number-matrix-columns-spanned %positiveInteger; #IMPLIED
262	table:value-type %valueType; "string"
263	table:value %float; #IMPLIED
264	table:date-value %date; #IMPLIED
265	table:time-value %timeInstance; #IMPLIED
266	table:boolean-value %boolean; #IMPLIED
267	table:string-value %string; #IMPLIED
268	table:currency %string; #IMPLIED
269>
270<!-- cell protection in writer: cell attribute; calc uses format -->
271<!ATTLIST table:table-cell table:protected %boolean; "false">
272
273<!ELEMENT table:cell-range-source EMPTY>
274<!ATTLIST table:cell-range-source
275	table:name %string; #REQUIRED
276	xlink:type (simple) #FIXED "simple"
277	xlink:actuate (onRequest) #FIXED "onRequest"
278	xlink:href %uriReference; #REQUIRED
279	table:filter-name %string; #REQUIRED
280	table:filter-options %string; #IMPLIED
281	table:last-column-spanned %positiveInteger; #REQUIRED
282	table:last-row-spanned %positiveInteger; #REQUIRED
283	table:refresh-delay %timeDuration; #IMPLIED
284>
285
286<!ELEMENT table:detective (table:highlighted-range*, table:operation*)>
287<!ELEMENT table:highlighted-range EMPTY>
288<!ATTLIST table:highlighted-range
289	table:cell-range-address %cell-range-address; #IMPLIED
290	table:direction (from-another-table | to-another-table | from-same-table | to-same-table) #REQUIRED
291	table:contains-error %boolean; "false"
292>
293<!ELEMENT table:operation EMPTY>
294<!ATTLIST table:operation
295	table:name (trace-dependents | remove-dependents | trace-precedents | remove-precedents | trace-errors) #REQUIRED
296	table:index %nonNegativeInteger; #REQUIRED
297>
298
299<!ELEMENT table:content-validations (table:content-validation)+>
300<!ELEMENT table:content-validation (table:help-message?, (table:error-message | (table:error-macro, office:events?))?)>
301<!ATTLIST table:content-validation
302	table:name CDATA #REQUIRED
303	table:condition CDATA #IMPLIED
304	table:base-cell-address %cell-address; #IMPLIED
305	table:allow-empty-cell %boolean; #IMPLIED
306>
307<!ELEMENT table:help-message (text:p*)>
308<!ATTLIST table:help-message
309	table:title CDATA #IMPLIED
310	table:display %boolean; #IMPLIED
311>
312<!ELEMENT table:error-message (text:p*)>
313<!ATTLIST table:error-message
314	table:title CDATA #IMPLIED
315	table:message-type (stop | warning | information) #IMPLIED
316	table:display %boolean; #IMPLIED
317>
318<!ELEMENT table:error-macro EMPTY>
319<!ATTLIST table:error-macro
320	table:name CDATA #IMPLIED
321	table:execute %boolean; #IMPLIED
322>
323
324<!ELEMENT table:sub-table ((%table-column-groups;) , (%table-row-groups;))>
325
326<!ELEMENT table:label-ranges (table:label-range)*>
327<!ELEMENT table:label-range EMPTY>
328<!ATTLIST table:label-range
329	table:label-cell-range-address %cell-range-address; #REQUIRED
330	table:data-cell-range-address %cell-range-address; #REQUIRED
331	table:orientation (column | row) #REQUIRED
332>
333
334<!ELEMENT table:named-expressions (table:named-range | table:named-expression)*>
335<!ELEMENT table:named-range EMPTY>
336<!ATTLIST table:named-range
337	table:name CDATA #REQUIRED
338	table:cell-range-address %cell-range-address; #REQUIRED
339	table:base-cell-address %cell-address; #IMPLIED
340	table:range-usable-as CDATA "none"
341>
342<!ELEMENT table:named-expression EMPTY>
343<!ATTLIST table:named-expression
344	table:name CDATA #REQUIRED
345	table:expression CDATA #REQUIRED
346	table:base-cell-address %cell-address; #IMPLIED
347>
348
349<!ELEMENT table:filter (table:filter-condition | table:filter-and | table:filter-or)>
350<!ATTLIST table:filter
351	table:target-range-address %cell-range-address; #IMPLIED
352	table:condition-source-range-address %cell-range-address; #IMPLIED
353	table:condition-source (self | cell-range) "self"
354	table:display-duplicates %boolean; "true"
355>
356<!ELEMENT table:filter-and (table:filter-or | table:filter-condition)+>
357<!ELEMENT table:filter-or (table:filter-and | table:filter-condition)+>
358<!ELEMENT table:filter-condition EMPTY>
359<!ATTLIST table:filter-condition
360	table:field-number %nonNegativeInteger; #REQUIRED
361	table:case-sensitive %boolean; "false"
362	table:data-type (text | number) "text"
363	table:value CDATA #REQUIRED
364	table:operator CDATA #REQUIRED
365>
366
367<!ELEMENT table:database-ranges (table:database-range)*>
368<!ELEMENT table:database-range ((table:database-source-sql | table:database-source-table | table:database-source-query)?, table:filter?, table:sort?, table:subtotal-rules?)>
369<!ATTLIST table:database-range
370	table:name CDATA #IMPLIED
371	table:is-selection %boolean; "false"
372	table:on-update-keep-styles %boolean; "false"
373	table:on-update-keep-size %boolean; "true"
374	table:has-persistant-data %boolean; "true"
375	table:orientation (row | column) "row"
376	table:contains-header %boolean; "true"
377	table:display-filter-buttons %boolean; "false"
378	table:target-range-address %cell-range-address; #REQUIRED
379	table:refresh-delay %timeDuration; #IMPLIED
380>
381<!ELEMENT table:database-source-sql EMPTY>
382<!ATTLIST table:database-source-sql
383	table:database-name CDATA #REQUIRED
384	table:sql-statement CDATA #REQUIRED
385	table:parse-sql-statements %boolean; "false"
386>
387<!ELEMENT table:database-source-table EMPTY>
388<!ATTLIST table:database-source-table
389	table:database-name CDATA #REQUIRED
390	table:table-name CDATA #REQUIRED
391>
392<!ELEMENT table:database-source-query EMPTY>
393<!ATTLIST table:database-source-query
394	table:database-name CDATA #REQUIRED
395	table:query-name CDATA #REQUIRED
396>
397
398<!ELEMENT table:sort (table:sort-by)+>
399<!ATTLIST table:sort
400	table:bind-styles-to-content %boolean; "true"
401	table:target-range-address %cell-range-address; #IMPLIED
402	table:case-sensitive %boolean; "false"
403	table:language CDATA #IMPLIED
404	table:country CDATA #IMPLIED
405	table:algorithm CDATA #IMPLIED
406>
407<!ELEMENT table:sort-by EMPTY>
408<!ATTLIST table:sort-by
409	table:field-number %nonNegativeInteger; #REQUIRED
410	table:data-type (text | number | automatic | qname-but-not-ncname) "automatic"
411	table:order (ascending | descending) "ascending"
412>
413
414<!ELEMENT table:subtotal-rules (table:sort-groups? | table:subtotal-rule*)?>
415<!ATTLIST table:subtotal-rules
416	table:bind-styles-to-content %boolean; "true"
417	table:case-sensitive %boolean; "false"
418	table:page-breaks-on-group-change %boolean; "false"
419>
420<!ELEMENT table:sort-groups EMPTY>
421<!ATTLIST table:sort-groups
422	table:data-type (text | number | automatic | qname-but-not-ncname) "automatic"
423	table:order (ascending | descending) "ascending"
424>
425<!ELEMENT table:subtotal-rule (table:subtotal-field)*>
426<!ATTLIST table:subtotal-rule
427	table:group-by-field-number %nonNegativeInteger; #REQUIRED
428>
429<!ELEMENT table:subtotal-field EMPTY>
430<!ATTLIST table:subtotal-field
431	table:field-number %nonNegativeInteger; #REQUIRED
432	table:function CDATA #REQUIRED
433>
434
435<!ELEMENT table:data-pilot-tables (table:data-pilot-table)*>
436<!ELEMENT table:data-pilot-table ((table:database-source-sql | table:database-source-table | table:database-source-query | table:source-service | table:source-cell-range)?, table:data-pilot-field+)>
437<!ATTLIST table:data-pilot-table
438	table:name CDATA #REQUIRED
439	table:application-data CDATA #IMPLIED
440	table:grand-total (none | row | column | both) "both"
441	table:ignore-empty-rows %boolean; "false"
442	table:identify-categories %boolean; "false"
443	table:target-range-address %cell-range-address; #REQUIRED
444	table:buttons %cell-range-address-list; #REQUIRED
445>
446<!ELEMENT table:source-service EMPTY>
447<!ATTLIST table:source-service
448	table:name CDATA #REQUIRED
449	table:source-name CDATA #REQUIRED
450	table:object-name CDATA #REQUIRED
451	table:username CDATA #IMPLIED
452	table:password CDATA #IMPLIED
453>
454<!ELEMENT table:source-cell-range (table:filter)?>
455<!ATTLIST table:source-cell-range
456	table:cell-range-address %cell-range-address; #REQUIRED
457>
458<!ELEMENT table:data-pilot-field (table:data-pilot-level)?>
459<!ATTLIST table:data-pilot-field
460	table:source-field-name CDATA #REQUIRED
461	table:is-data-layout-field %boolean; "false"
462	table:function CDATA #REQUIRED
463	table:orientation (row | column | data | page | hidden) #REQUIRED
464	table:used-hierarchy %positiveInteger; "1"
465>
466<!ELEMENT table:data-pilot-level (table:data-pilot-subtotals?, table:data-pilot-members?)>
467<!ATTLIST table:data-pilot-level
468	table:display-empty %boolean; #IMPLIED
469>
470<!ELEMENT table:data-pilot-subtotals (table:data-pilot-subtotal)*>
471<!ELEMENT table:data-pilot-subtotal EMPTY>
472<!ATTLIST table:data-pilot-subtotal
473	table:function CDATA #REQUIRED
474>
475<!ELEMENT table:data-pilot-members (table:data-pilot-member)*>
476<!ELEMENT table:data-pilot-member EMPTY>
477<!ATTLIST table:data-pilot-member
478	table:name CDATA #REQUIRED
479	table:display %boolean; #IMPLIED
480	table:display-details %boolean; #IMPLIED
481>
482
483<!ELEMENT table:consolidation EMPTY>
484<!ATTLIST table:consolidation
485	table:function CDATA #REQUIRED
486	table:source-cell-range-addresses %cell-range-address-list; #REQUIRED
487	table:target-cell-address %cell-address; #REQUIRED
488	table:use-label (none | column | row | both) "none"
489	table:link-to-source-data %boolean; "false"
490>
491
492<!ELEMENT table:dde-links (table:dde-link)+>
493<!ELEMENT table:dde-link (office:dde-source, table:table)>
494