1<?xml version="1.0" encoding="UTF-8"?>
2<!--***********************************************************
3 *
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements.  See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership.  The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License.  You may obtain a copy of the License at
11 *
12 *   http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied.  See the License for the
18 * specific language governing permissions and limitations
19 * under the License.
20 *
21 ***********************************************************-->
22
23
24<!---->
25<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
26           elementFormDefault="qualified"
27           targetNamespace="urn:oasis:names:tc:opendocument:xmlns:report:1.0"
28           xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
29           xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
30           xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
31           xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
32           xmlns:xlink="http://www.w3.org/1999/xlink"
33           xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
34           xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"
35           xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
36           xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
37           xmlns:rpt="urn:oasis:names:tc:opendocument:xmlns:report:1.0"
38           xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0"
39           xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0"
40           xmlns:smil="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0"
41           xmlns:xforms="http://www.w3.org/2002/xforms"
42           xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
43           xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
44           xmlns:ns1="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
45           xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
46           xmlns:math="http://www.w3.org/1998/Math/MathML"
47           xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
48           xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
49           xmlns:dc="http://purl.org/dc/elements/1.1/">
50    <xs:import namespace="http://purl.org/dc/elements/1.1/" schemaLocation="dc.xsd"/>
51    <xs:import namespace="http://www.w3.org/1998/Math/MathML" schemaLocation="math.xsd"/>
52    <xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="xlink.xsd"/>
53    <xs:import namespace="http://www.w3.org/2002/xforms" schemaLocation="xforms.xsd"/>
54    <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:animation:1.0" schemaLocation="anim.xsd"/>
55    <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" schemaLocation="chart.xsd"/>
56    <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:config:1.0" schemaLocation="config.xsd"/>
57    <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" schemaLocation="ns1.xsd"/>
58    <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" schemaLocation="dr3d.xsd"/>
59    <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" schemaLocation="draw.xsd"/>
60    <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:form:1.0" schemaLocation="form.xsd"/>
61    <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" schemaLocation="meta.xsd"/>
62    <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:office:1.0" schemaLocation="office.xsd"/>
63    <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" schemaLocation="presentation.xsd"/>
64    <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:script:1.0" schemaLocation="script.xsd"/>
65    <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0" schemaLocation="smil.xsd"/>
66    <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:style:1.0" schemaLocation="style.xsd"/>
67    <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" schemaLocation="svg.xsd"/>
68    <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:table:1.0" schemaLocation="table.xsd"/>
69    <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:text:1.0" schemaLocation="OpenDocument-schema-v1.0-os.xsd"/>
70    <xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" schemaLocation="fo.xsd"/>
71    <xs:attributeGroup name="office-report-attlist">
72        <xs:attribute name="command-type" default="command" form="qualified">
73            <xs:simpleType>
74                <xs:restriction base="xs:token">
75                    <xs:enumeration value="table"/>
76                    <xs:enumeration value="query"/>
77                    <xs:enumeration value="command"/>
78                </xs:restriction>
79            </xs:simpleType>
80        </xs:attribute>
81        <xs:attribute name="command" form="qualified" type="text:string"/>
82        <xs:attribute name="escape-processing" default="true" form="qualified" type="text:boolean"/>
83        <xs:attribute name="filter" form="qualified" type="text:string"/>
84        <xs:attribute name="caption" form="qualified" type="text:string"/>
85    </xs:attributeGroup>
86    <xs:element name="report-component">
87        <xs:complexType>
88            <xs:attributeGroup ref="text:common-draw-name-attlist"/>
89        </xs:complexType>
90    </xs:element>
91    <xs:element name="group">
92        <xs:complexType>
93            <xs:sequence>
94                <xs:element minOccurs="0" maxOccurs="unbounded" ref="rpt:function"/>
95                <xs:element minOccurs="0" ref="rpt:group-header"/>
96                <xs:choice>
97                    <xs:element ref="rpt:group"/>
98                    <xs:element ref="rpt:detail"/>
99                </xs:choice>
100                <xs:element minOccurs="0" ref="rpt:group-footer"/>
101            </xs:sequence>
102            <xs:attributeGroup ref="rpt:rpt-group-attlist"/>
103        </xs:complexType>
104    </xs:element>
105    <xs:attributeGroup name="rpt-group-attlist">
106        <xs:attribute name="sort-ascending" use="required" form="qualified">
107            <xs:simpleType>
108                <xs:restriction base="xs:token">
109                    <xs:enumeration value="true"/>
110                    <xs:enumeration value="false"/>
111                </xs:restriction>
112            </xs:simpleType>
113        </xs:attribute>
114        <xs:attribute name="start-new-column" default="false" form="qualified">
115            <xs:simpleType>
116                <xs:restriction base="xs:token">
117                    <xs:enumeration value="true"/>
118                    <xs:enumeration value="false"/>
119                </xs:restriction>
120            </xs:simpleType>
121        </xs:attribute>
122        <xs:attribute name="reset-page-number" default="false" form="qualified">
123            <xs:simpleType>
124                <xs:restriction base="xs:token">
125                    <xs:enumeration value="true"/>
126                    <xs:enumeration value="false"/>
127                </xs:restriction>
128            </xs:simpleType>
129        </xs:attribute>
130        <xs:attribute name="print-header-on-each-page" default="false" form="qualified">
131            <xs:simpleType>
132                <xs:restriction base="xs:token">
133                    <xs:enumeration value="true"/>
134                    <xs:enumeration value="false"/>
135                </xs:restriction>
136            </xs:simpleType>
137        </xs:attribute>
138        <xs:attribute name="group-expression" use="required" form="qualified" type="text:string"/>
139        <xs:attribute name="keep-together" default="no" form="qualified">
140            <xs:simpleType>
141                <xs:restriction base="xs:token">
142                    <xs:enumeration value="no"/>
143                    <xs:enumeration value="whole-group"/>
144                    <xs:enumeration value="with-first-detail"/>
145                </xs:restriction>
146            </xs:simpleType>
147        </xs:attribute>
148    </xs:attributeGroup>
149    <xs:element name="group-header">
150        <xs:complexType>
151            <xs:sequence>
152                <xs:element ref="table:table"/>
153            </xs:sequence>
154            <xs:attributeGroup ref="rpt:rpt-group-section-attlist"/>
155        </xs:complexType>
156    </xs:element>
157    <xs:element name="group-footer">
158        <xs:complexType>
159            <xs:sequence>
160                <xs:element ref="table:table"/>
161            </xs:sequence>
162            <xs:attributeGroup ref="rpt:rpt-group-section-attlist"/>
163        </xs:complexType>
164    </xs:element>
165    <xs:element name="report-header">
166        <xs:complexType>
167            <xs:sequence>
168                <xs:element ref="table:table"/>
169            </xs:sequence>
170        </xs:complexType>
171    </xs:element>
172    <xs:element name="page-header">
173        <xs:complexType>
174            <xs:sequence>
175                <xs:element ref="table:table"/>
176            </xs:sequence>
177            <xs:attributeGroup ref="rpt:rpt-page-attlist"/>
178        </xs:complexType>
179    </xs:element>
180    <xs:element name="column-header">
181        <xs:complexType>
182            <xs:sequence>
183                <xs:element ref="table:table"/>
184            </xs:sequence>
185        </xs:complexType>
186    </xs:element>
187    <xs:element name="detail">
188        <xs:complexType>
189            <xs:sequence>
190                <xs:element ref="table:table"/>
191            </xs:sequence>
192        </xs:complexType>
193    </xs:element>
194    <xs:element name="column-footer">
195        <xs:complexType>
196            <xs:sequence>
197                <xs:element ref="table:table"/>
198            </xs:sequence>
199        </xs:complexType>
200    </xs:element>
201    <xs:element name="page-footer">
202        <xs:complexType>
203            <xs:sequence>
204                <xs:element ref="table:table"/>
205            </xs:sequence>
206            <xs:attributeGroup ref="rpt:rpt-page-attlist"/>
207        </xs:complexType>
208    </xs:element>
209    <xs:element name="report-footer">
210        <xs:complexType>
211            <xs:sequence>
212                <xs:element ref="table:table"/>
213            </xs:sequence>
214        </xs:complexType>
215    </xs:element>
216    <xs:attributeGroup name="rpt-page-attlist">
217        <xs:attribute name="page-print-option" default="all-pages" form="qualified">
218            <xs:simpleType>
219                <xs:restriction base="xs:token">
220                    <xs:enumeration value="all-pages"/>
221                    <xs:enumeration value="not-with-report-header"/>
222                    <xs:enumeration value="not-with-report-footer"/>
223                    <xs:enumeration value="not-with-report-header-nor-footer"/>
224                </xs:restriction>
225            </xs:simpleType>
226        </xs:attribute>
227    </xs:attributeGroup>
228    <xs:attributeGroup name="rpt-section-attlist">
229        <xs:attribute name="visible" default="true" form="qualified">
230            <xs:simpleType>
231                <xs:restriction base="xs:token">
232                    <xs:enumeration value="true"/>
233                    <xs:enumeration value="false"/>
234                </xs:restriction>
235            </xs:simpleType>
236        </xs:attribute>
237        <xs:attribute name="force-new-page" default="none" form="qualified">
238            <xs:simpleType>
239                <xs:restriction base="xs:token">
240                    <xs:enumeration value="none"/>
241                    <xs:enumeration value="before-section"/>
242                    <xs:enumeration value="after-section"/>
243                    <xs:enumeration value="before-after-section"/>
244                </xs:restriction>
245            </xs:simpleType>
246        </xs:attribute>
247        <xs:attribute name="new-row-or-column" default="none" form="qualified">
248            <xs:simpleType>
249                <xs:restriction base="xs:token">
250                    <xs:enumeration value="none"/>
251                    <xs:enumeration value="before-section"/>
252                    <xs:enumeration value="after-section"/>
253                    <xs:enumeration value="before-after-section"/>
254                </xs:restriction>
255            </xs:simpleType>
256        </xs:attribute>
257        <xs:attribute name="keep-together" default="false" form="qualified">
258            <xs:simpleType>
259                <xs:restriction base="xs:token">
260                    <xs:enumeration value="true"/>
261                    <xs:enumeration value="false"/>
262                </xs:restriction>
263            </xs:simpleType>
264        </xs:attribute>
265    </xs:attributeGroup>
266    <xs:attributeGroup name="rpt-group-section-attlist">
267        <xs:attribute name="repeat-section" default="false" form="qualified">
268            <xs:simpleType>
269                <xs:restriction base="xs:token">
270                    <xs:enumeration value="true"/>
271                    <xs:enumeration value="false"/>
272                </xs:restriction>
273            </xs:simpleType>
274        </xs:attribute>
275    </xs:attributeGroup>
276    <xs:element name="sub-document">
277        <xs:complexType>
278            <xs:sequence>
279                <xs:group ref="rpt:report-master-detail-fields"/>
280                <xs:element ref="rpt:report-element"/>
281                <xs:choice minOccurs="0">
282                    <xs:element ref="office:document"/>
283                    <xs:element ref="math:math"/>
284                </xs:choice>
285            </xs:sequence>
286            <xs:attributeGroup ref="rpt:report-sub-document-attlist"/>
287        </xs:complexType>
288    </xs:element>
289    <xs:attributeGroup name="report-sub-document-attlist">
290        <xs:attribute ref="xlink:href"/>
291        <xs:attribute ref="xlink:type"/>
292        <xs:attributeGroup ref="xlink:show"/>
293        <xs:attributeGroup ref="xlink:actuate"/>
294    </xs:attributeGroup>
295    <xs:group name="report-master-detail-fields">
296        <xs:sequence>
297            <xs:element minOccurs="0" ref="rpt:master-detail-fields"/>
298        </xs:sequence>
299    </xs:group>
300    <xs:element name="master-detail-fields">
301        <xs:complexType>
302            <xs:sequence>
303                <xs:element minOccurs="0" maxOccurs="unbounded" ref="rpt:master-detail-field"/>
304            </xs:sequence>
305        </xs:complexType>
306    </xs:element>
307    <xs:element name="master-detail-field">
308        <xs:complexType>
309            <xs:attribute name="master" use="required" form="qualified" type="text:string"/>
310            <xs:attribute name="detail" form="qualified" type="text:string"/>
311        </xs:complexType>
312    </xs:element>
313    <xs:element name="function">
314        <xs:complexType>
315            <xs:attribute name="formula" use="required" form="qualified" type="text:formula"/>
316            <xs:attribute name="name" use="required" form="qualified" type="text:string"/>
317            <xs:attribute name="pre-evaluated" use="required" form="qualified">
318                <xs:simpleType>
319                    <xs:restriction base="xs:token">
320                        <xs:enumeration value="true"/>
321                        <xs:enumeration value="false"/>
322                    </xs:restriction>
323                </xs:simpleType>
324            </xs:attribute>
325        </xs:complexType>
326    </xs:element>
327    <xs:element name="report-element">
328        <xs:complexType>
329            <xs:sequence>
330                <xs:element minOccurs="0" ref="rpt:conditional-print-expression"/>
331                <xs:element minOccurs="0" ref="rpt:report-component"/>
332                <xs:element minOccurs="0" maxOccurs="unbounded" ref="rpt:format-condition"/>
333            </xs:sequence>
334            <xs:attributeGroup ref="rpt:rpt-report-element-attlist"/>
335        </xs:complexType>
336    </xs:element>
337    <xs:attributeGroup name="rpt-report-element-attlist">
338        <xs:attribute name="print-when-group-change" default="false" form="qualified">
339            <xs:simpleType>
340                <xs:restriction base="xs:token">
341                    <xs:enumeration value="true"/>
342                    <xs:enumeration value="false"/>
343                </xs:restriction>
344            </xs:simpleType>
345        </xs:attribute>
346        <xs:attribute name="print-repeated-values" default="true" form="qualified">
347            <xs:simpleType>
348                <xs:restriction base="xs:token">
349                    <xs:enumeration value="true"/>
350                    <xs:enumeration value="false"/>
351                </xs:restriction>
352            </xs:simpleType>
353        </xs:attribute>
354    </xs:attributeGroup>
355    <xs:element name="conditional-print-expression" type="xs:string"/>
356    <xs:element name="format-condition">
357        <xs:complexType>
358            <xs:attributeGroup ref="rpt:rpt-format-condition-attlist"/>
359        </xs:complexType>
360    </xs:element>
361    <xs:attributeGroup name="rpt-format-condition-attlist">
362        <xs:attribute name="enabled" default="false" form="qualified">
363            <xs:simpleType>
364                <xs:restriction base="xs:token">
365                    <xs:enumeration value="true"/>
366                    <xs:enumeration value="false"/>
367                </xs:restriction>
368            </xs:simpleType>
369        </xs:attribute>
370        <xs:attribute name="formula" form="qualified" type="text:formula"/>
371    </xs:attributeGroup>
372    <xs:element name="fixed-content">
373        <xs:complexType>
374            <xs:sequence>
375                <xs:element ref="rpt:report-element"/>
376                <xs:element ref="text:p"/>
377            </xs:sequence>
378        </xs:complexType>
379    </xs:element>
380    <xs:element name="formatted-text">
381        <xs:complexType>
382            <xs:sequence>
383                <xs:element ref="rpt:report-element"/>
384                <xs:group ref="text:common-form-control-content"/>
385            </xs:sequence>
386        </xs:complexType>
387    </xs:element>
388    <xs:attributeGroup name="rpt-formatted-text-attlist">
389        <xs:attributeGroup ref="text:common-data-field-attlist"/>
390    </xs:attributeGroup>
391    <xs:element name="image">
392        <xs:complexType>
393            <xs:sequence>
394                <xs:element ref="rpt:report-element"/>
395            </xs:sequence>
396        </xs:complexType>
397    </xs:element>
398    <xs:attributeGroup name="rpt-image-attlist">
399        <xs:attributeGroup ref="text:common-data-field-attlist"/>
400        <xs:attributeGroup ref="text:image-data"/>
401        <xs:attribute name="scale" use="required" form="qualified">
402            <xs:simpleType>
403                <xs:restriction base="xs:token">
404                    <xs:enumeration value="true"/>
405                    <xs:enumeration value="false"/>
406                </xs:restriction>
407            </xs:simpleType>
408        </xs:attribute>
409    </xs:attributeGroup>
410</xs:schema>
411