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