xref: /trunk/main/xmloff/dtd/office.mod (revision cdf0e10c)
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 office:document ( office:meta?,
29							office:settings?,
30							office:script?,
31							office:font-decls?,
32							office:styles?,
33							office:automatic-styles?,
34							office:master-styles?,
35							office:body ) >
36
37<!ATTLIST office:document xmlns:office	CDATA #FIXED "&nOffice;">
38<!ATTLIST office:document xmlns:meta	CDATA #FIXED "&nMeta;">
39<!ATTLIST office:document xmlns:script	CDATA #FIXED "&nScript;">
40<!ATTLIST office:document xmlns:style	CDATA #FIXED "&nStyle;">
41<!ATTLIST office:document xmlns:text	CDATA #FIXED "&nText;">
42<!ATTLIST office:document xmlns:table	CDATA #FIXED "&nTable;">
43<!ATTLIST office:document xmlns:draw	CDATA #FIXED "&nDraw;">
44<!ATTLIST office:document xmlns:chart	CDATA #FIXED "&nChart;">
45<!ATTLIST office:document xmlns:number	CDATA #FIXED "&nNumber;">
46<!ATTLIST office:document xmlns:fo		CDATA #FIXED "&nFO;">
47<!ATTLIST office:document xmlns:xlink	CDATA #FIXED "&nXLink;">
48<!ATTLIST office:document xmlns:svg		CDATA #FIXED "&nSVG;">
49<!ATTLIST office:document xmlns:dc		CDATA #FIXED "&nDC;">
50<!ATTLIST office:document xmlns:dr3d	CDATA #FIXED "&nDr3D;">
51<!ATTLIST office:document xmlns:math	CDATA #FIXED "&nMath;">
52<!ATTLIST office:document xmlns:form	CDATA #FIXED "&nForm;">
53<!ATTLIST office:document xmlns:config	CDATA #FIXED "&nConfig;">
54<!ATTLIST office:document xmlns:presentation	CDATA #FIXED "&nPresentation;">
55
56<!ATTLIST office:document office:class
57						  (text|text-global|
58						   drawing|presentation|
59						   spreadsheet|chart) #REQUIRED>
60
61<!ATTLIST office:document office:version	%string; #IMPLIED>
62
63<!-- document-styles -->
64<!ELEMENT office:document-styles (
65							office:font-decls?,
66							office:styles?,
67							office:automatic-styles?,
68							office:master-styles? ) >
69
70<!ATTLIST office:document-styles xmlns:office	CDATA #FIXED "&nOffice;">
71<!ATTLIST office:document-styles xmlns:meta	CDATA #FIXED "&nMeta;">
72<!ATTLIST office:document-styles xmlns:script	CDATA #FIXED "&nScript;">
73<!ATTLIST office:document-styles xmlns:style	CDATA #FIXED "&nStyle;">
74<!ATTLIST office:document-styles xmlns:text	CDATA #FIXED "&nText;">
75<!ATTLIST office:document-styles xmlns:table	CDATA #FIXED "&nTable;">
76<!ATTLIST office:document-styles xmlns:draw	CDATA #FIXED "&nDraw;">
77<!ATTLIST office:document-styles xmlns:chart	CDATA #FIXED "&nChart;">
78<!ATTLIST office:document-styles xmlns:number	CDATA #FIXED "&nNumber;">
79<!ATTLIST office:document-styles xmlns:fo		CDATA #FIXED "&nFO;">
80<!ATTLIST office:document-styles xmlns:xlink	CDATA #FIXED "&nXLink;">
81<!ATTLIST office:document-styles xmlns:svg		CDATA #FIXED "&nSVG;">
82<!ATTLIST office:document-styles xmlns:dc		CDATA #FIXED "&nDC;">
83<!ATTLIST office:document-styles xmlns:dr3d		CDATA #FIXED "&nDr3D;">
84<!ATTLIST office:document-styles xmlns:math		CDATA #FIXED "&nMath;">
85<!ATTLIST office:document-styles xmlns:form		CDATA #FIXED "&nForm;">
86
87<!ATTLIST office:document-styles office:version	%string; #IMPLIED>
88
89<!-- document-content -->
90
91<!ELEMENT office:document-content (
92							office:script?,
93							office:font-decls?,
94							office:automatic-styles?,
95							office:body ) >
96
97<!ATTLIST office:document-content xmlns:office	CDATA #FIXED "&nOffice;">
98<!ATTLIST office:document-content xmlns:meta	CDATA #FIXED "&nMeta;">
99<!ATTLIST office:document-content xmlns:script	CDATA #FIXED "&nScript;">
100<!ATTLIST office:document-content xmlns:style	CDATA #FIXED "&nStyle;">
101<!ATTLIST office:document-content xmlns:text	CDATA #FIXED "&nText;">
102<!ATTLIST office:document-content xmlns:table	CDATA #FIXED "&nTable;">
103<!ATTLIST office:document-content xmlns:draw	CDATA #FIXED "&nDraw;">
104<!ATTLIST office:document-content xmlns:chart	CDATA #FIXED "&nChart;">
105<!ATTLIST office:document-content xmlns:number	CDATA #FIXED "&nNumber;">
106<!ATTLIST office:document-content xmlns:fo		CDATA #FIXED "&nFO;">
107<!ATTLIST office:document-content xmlns:xlink	CDATA #FIXED "&nXLink;">
108<!ATTLIST office:document-content xmlns:svg		CDATA #FIXED "&nSVG;">
109<!ATTLIST office:document-content xmlns:dc		CDATA #FIXED "&nDC;">
110<!ATTLIST office:document-content xmlns:dr3d	CDATA #FIXED "&nDr3D;">
111<!ATTLIST office:document-content xmlns:math	CDATA #FIXED "&nMath;">
112<!ATTLIST office:document-content xmlns:form	CDATA #FIXED "&nForm;">
113
114<!ATTLIST office:document-content office:class
115						  (text|text-global|
116						   drawing|presentation|
117						   spreadsheet|chart) #REQUIRED>
118
119<!ATTLIST office:document-content office:version	%string; #IMPLIED>
120
121<!-- document-content -->
122
123<!ELEMENT office:document-meta ( office:meta? ) >
124
125<!ATTLIST office:document-meta xmlns:office	CDATA #FIXED "&nOffice;">
126<!ATTLIST office:document-meta xmlns:meta	CDATA #FIXED "&nMeta;">
127<!ATTLIST office:document-meta xmlns:script	CDATA #FIXED "&nScript;">
128<!ATTLIST office:document-meta xmlns:style	CDATA #FIXED "&nStyle;">
129<!ATTLIST office:document-meta xmlns:text	CDATA #FIXED "&nText;">
130<!ATTLIST office:document-meta xmlns:table	CDATA #FIXED "&nTable;">
131<!ATTLIST office:document-meta xmlns:draw	CDATA #FIXED "&nDraw;">
132<!ATTLIST office:document-meta xmlns:chart	CDATA #FIXED "&nChart;">
133<!ATTLIST office:document-meta xmlns:number	CDATA #FIXED "&nNumber;">
134<!ATTLIST office:document-meta xmlns:fo		CDATA #FIXED "&nFO;">
135<!ATTLIST office:document-meta xmlns:xlink	CDATA #FIXED "&nXLink;">
136<!ATTLIST office:document-meta xmlns:svg		CDATA #FIXED "&nSVG;">
137<!ATTLIST office:document-meta xmlns:dc		CDATA #FIXED "&nDC;">
138<!ATTLIST office:document-meta xmlns:dr3d	CDATA #FIXED "&nDr3D;">
139<!ATTLIST office:document-meta xmlns:math	CDATA #FIXED "&nMath;">
140<!ATTLIST office:document-meta xmlns:form	CDATA #FIXED "&nForm;">
141
142<!ATTLIST office:document-meta office:version	%string; #IMPLIED>
143
144<!ELEMENT office:document-settings (office:settings) >
145<!ATTLIST office:document-settings xmlns:office	CDATA #FIXED "&nOffice;">
146<!ATTLIST office:document-settings xmlns:xlink	CDATA #FIXED "&nXLink;">
147<!ATTLIST office:document-settings xmlns:config	CDATA #FIXED "&nConfig;">
148
149<!ATTLIST office:document-settings office:version	%string; #IMPLIED>
150
151<!ENTITY % meta "(meta:generator?,
152				  dc:title?,
153				  dc:description?,
154				  dc:subject?,
155				  meta:initial-creator?,
156				  meta:creation-date?,
157				  dc:creator?,
158				  dc:date?,
159				  meta:printed-by?,
160				  meta:print-date?,
161				  meta:keywords?,
162				  dc:language?,
163				  meta:editing-cycles?,
164				  meta:editing-duration?,
165				  meta:hyperlink-behaviour?,
166				  meta:auto-reload?,
167				  meta:template?,
168				  meta:user-defined*,
169				  meta:document-statistic?)">
170<!ELEMENT office:meta %meta;>
171
172<!ENTITY % script	"office:script-data*,office:events?">
173<!ELEMENT office:script (%script;)>
174
175<!ELEMENT office:script-data (script:libraries*)>
176<!ATTLIST office:script-data script:language %string; #REQUIRED>
177
178<!ELEMENT office:font-decls (style:font-decl)*>
179
180<!ENTITY % styles "(style:default-style|style:style|text:list-style|
181		number:number-style|number:currency-style|number:percentage-style|
182		number:date-style|number:time-style|number:boolean-style|
183		number:text-style|
184		draw:gradient|draw:hatch|draw:fill-image|draw:marker|draw:stroke-dash|
185		style:presentation-page-layout|draw:transparency)">
186
187<!-- Validity constraint: The elements
188		text:outline-style,
189		text:footnotes-configuration,
190		text:endnotes-configuration,
191		text:bibliography-configuration and
192		text:linenumbering-configuration
193	may appear only once!
194	Unfortunatetly, this constraint cannot be easily specified in the DTD.
195-->
196<!ELEMENT office:styles (%styles;|text:outline-style|
197		text:footnotes-configuration|text:endnotes-configuration|
198		text:bibliography-configuration|text:linenumbering-configuration)*>
199
200<!ELEMENT office:automatic-styles (%styles;|style:page-master)*>
201
202<!ELEMENT office:master-styles (draw:layer-set?,style:handout-master?,style:master-page*) >
203
204
205<!ENTITY % body "(office:forms?,(text:tracked-changes|table:tracked-changes)?,%text-decls;,table:calculation-settings?,table:content-validations?,table:label-ranges?,
206		(text:h|text:p|text:ordered-list|
207		text:unordered-list|table:table|draw:page|
208		draw:a|%shape;|text:section|text:table-of-content|
209		text:illustration-index|text:table-index|text:object-index|
210		text:user-index|text:alphabetical-index|text:bibliography|
211		%change-marks;)*,
212		table:named-expressions?,
213		table:database-ranges?,table:data-pilot-tables?,
214		table:consolidation?,
215		table:dde-links?,
216		presentation:settings?)">
217<!ELEMENT office:body %body;>
218<!ATTLIST office:body table:structure-protected %boolean; "false"
219			table:protection-key CDATA #IMPLIED>
220
221<!ELEMENT office:events (script:event|presentation:event)*>
222
223<!-- DDE source: for text sections and tables -->
224<!ELEMENT office:dde-source EMPTY>
225<!ATTLIST office:dde-source office:dde-application CDATA #IMPLIED>
226<!ATTLIST office:dde-source office:dde-topic CDATA #IMPLIED>
227<!ATTLIST office:dde-source office:dde-item CDATA #IMPLIED>
228<!ATTLIST office:dde-source office:automatic-update %boolean; "false">
229<!ATTLIST office:dde-source office:name CDATA #IMPLIED>
230<!ATTLIST office:dde-source table:conversion-mode (into-default-style-data-style|into-english-number|let-text) "into-default-style-data-style" >
231
232<!-- annotations -->
233<!-- limitation: in the current implementation, only plain text inside of
234     paragraphs is supported -->
235<!ELEMENT office:annotation (text:p)*>
236<!ATTLIST office:annotation office:author %string; #IMPLIED>
237<!ATTLIST office:annotation office:create-date %date; #IMPLIED>
238<!ATTLIST office:annotation office:create-date-string %string; #IMPLIED>
239<!ATTLIST office:annotation office:display %boolean; "false">
240
241<!ELEMENT office:change-info (text:p)*>
242<!ATTLIST office:change-info office:chg-author %string; #REQUIRED>
243<!ATTLIST office:change-info office:chg-date-time %timeInstance; #REQUIRED>
244
245<!ELEMENT office:binary-data (#PCDATA)>
246