summaryrefslogtreecommitdiff
path: root/awml.dtd
blob: b7e17b0f4d4130efe55c04ddae9733a56a40c851 (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
<!--

          AbiWord Markup Language DTD
	  Last updated January 17, 2007 
          (but still far from complete and correct)

	  Currently, this document is intend for reference purposes only, 
	  and should not be interpreted as an absolute guide to the 
	  AbiWord file format.  A more comprehsive view can be gained 
	  from the code in files ie_exp_AbiWord_1.cpp and 
	  ie_imp_AbiWord_1.cpp  These are currently definitive.  Other 
	  documentation is available in docs/AbiWord_DocumentFormat.abw

	  Sam Tobin-Hochstadt
	  Christian Biesinger    - Updated in August 2002
	  Marc Maurer            - Updated in January 2007

-->


<!ELEMENT abiword (metadata?, history?, revisions?, ignoredwords?, styles?, lists?, pagesize*, section+, data?)>
<!ATTLIST abiword
          version     CDATA "unnumbered"
          fileformat  CDATA "">
<!-- This is the root element, with an attribute 
     representing the version number, and an 
     attribute representing the file format 
     version. -->

<!-- awml is an alias for abiword. copying above declaration. -->
<!ELEMENT awml (metadata?, history?, revisions?, ignoredwords?, styles?, lists?, pagesize*, section+, data?)>
<!ATTLIST awml
          version     CDATA "unnumbered"
          fileformat  CDATA "">

<!ELEMENT metadata (m+)>
<!ELEMENT m (#PCDATA)>
<!ATTLIST m
	  key CDATA #REQUIRED>

<!ELEMENT ignoredwords (iw+)>
<!ELEMENT iw (#PCDATA)>
<!-- Each iw element contains a single word which 
     is to be ignored when spell-checking the 
     document. -->

<!ELEMENT history   (version+)>
<!ATTLIST history
          version    CDATA #REQUIRED
	  edit-time  CDATA #REQUIRED
 	  last-saved CDATA #REQUIRED
          uid        CDATA #REQUIRED>
<!-- A history keeps track of when the document was saved. -->

<!ELEMENT version   EMPTY>
<!ATTLIST version
          id       CDATA #REQUIRED
	  started  CDATA #REQUIRED
 	  uid      CDATA #REQUIRED
          auto     CDATA #REQUIRED
          top-xid  CDATA #REQUIRED>
<!-- A version represents a single safe-point in time. -->

<!ELEMENT revisions   (r+)>
<!ATTLIST revisions
          show       CDATA #REQUIRED
	  mark       CDATA #REQUIRED
 	  show-level CDATA #REQUIRED
          auto       CDATA #REQUIRED>
<!-- Revisions store all document changes made within a
     single editing session. -->

<!ELEMENT styles (s*)>
<!ELEMENT s  EMPTY>
<!ATTLIST s
          basedon  CDATA #IMPLIED
	  name     CDATA #REQUIRED
	  type     CDATA #IMPLIED
	  parentid CDATA #IMPLIED
	  level    CDATA #IMPLIED
	  style    CDATA #IMPLIED
          props    CDATA #IMPLIED>
<!-- Styles allow for paragraph level formatting.  
     The basedon attribute specifies inheritance
     and the props attribute specifies features 
     of the style. -->

<!ELEMENT lists (l*)>
<!ELEMENT l  EMPTY>
<!ATTLIST l
          id           CDATA #REQUIRED
	  parentid     CDATA #REQUIRED
	  type         CDATA #REQUIRED
          start-value  CDATA #REQUIRED
	  list-decimal CDATA #REQUIRED
          list-delim   CDATA #REQUIRED>
<!-- Styles allow for paragraph level formatting.  
     The basedon attribute specifies inheritance
     and the props attribute specifies features 
     of the style. -->

<!ELEMENT pagesize EMPTY>
<!ATTLIST pagesize
          pagetype     CDATA #REQUIRED
	  orientation  CDATA #REQUIRED
	  width        CDATA #REQUIRED  
	  height       CDATA #REQUIRED
	  units        CDATA #REQUIRED
	  page-scale   CDATA #REQUIRED>
<!-- pagesizes specify different page sizes that can
     be used in the document.  -->

<!ELEMENT section   ((p | table | frame | toc)+)>
<!ATTLIST section
          props       CDATA            #IMPLIED
	  type        (footer | CDATA) #IMPLIED
	  id          CDATA            #IMPLIED
	  header      CDATA            #IMPLIED
	  footer      CDATA            #IMPLIED
	  num_columns CDATA            #IMPLIED
	  column_gap  CDATA            #IMPLIED
          xid         CDATA            #IMPLIED>
<!-- Sections are collections of paragraphs, tables,
     Table of Contents and frames.  
     They may specify footers to be attached, 
     or formatting properties. -->

<!ELEMENT p      (#PCDATA | c | field | f | image | i | cbr | pbr | br | bookmark | a)*>
<!ATTLIST p
          props    CDATA                            #IMPLIED
	  level    (0|1|2|3|4|5|6|7|8|9|10 | CDATA) #IMPLIED
	  style    CDATA                            #IMPLIED
	  listid   CDATA			    #IMPLIED
	  parentid CDATA			    #IMPLIED
	  xid      CDATA			    #IMPLIED
	  id       ID                               #IMPLIED>
<!-- p element contain text, images, fields or character 
     spans.  Level is used for lists, style for styles
     and props for formatting. listid and parentid are 
     both used in lists. -->

<!ELEMENT c      (#PCDATA | cbr | pbr | br)*>
<!ATTLIST c
          props CDATA                #IMPLIED
	  type  (list_label | CDATA) #IMPLIED
	  style CDATA                #IMPLIED>
<!-- c is used to specify character based formatting
     which is done with the props attribute.
     type is used for lists. style can specify 
     predefined styles. -->

<!ELEMENT field      EMPTY>
<!ATTLIST field
          type CDATA #REQUIRED
          xid  CDATA #IMPLIED>
<!-- fields represent calculated data on the page. -->
<!ELEMENT f      EMPTY>
<!ATTLIST f
          type CDATA #REQUIRED>
<!-- f is an alias for field -->

<!ELEMENT image     EMPTY>
<!ATTLIST image 
          dataid CDATA #REQUIRED
	  props  CDATA #IMPLIED
	  title  CDATA #IMPLIED
	  alt    CDATA #IMPLIED
	  xid    CDATA #IMPLIED>
<!-- image refers to an image in 
     d section.  it is used much
     the same as in HTML. -->

<!ELEMENT i     EMPTY>
<!ATTLIST i 
          dataid CDATA #REQUIRED
	  props  CDATA #IMPLIED>
<!-- i is an alias for image -->

<!ELEMENT br      EMPTY>
<!ELEMENT pbr     EMPTY>
<!ELEMENT cbr     EMPTY>
<!-- These represent line,
     page and column breaks. -->

<!ELEMENT data      (d+)>
<!ELEMENT d    (#PCDATA)>
<!ATTLIST d
          name CDATA #REQUIRED>
<!-- d is used to store actual 
     data, which currently means
     images. -->

<!ELEMENT bookmark EMPTY>
<!ATTLIST bookmark type (start|end) #REQUIRED
                   name CDATA       #REQUIRED
                   xid  CDATA       #IMPLIED>

<!ELEMENT a (c)>
<!ATTLIST a href CDATA #REQUIRED>
<!-- link to bookmark -->

<!ELEMENT table   (cell+)>
<!ATTLIST table
          props  CDATA #IMPLIED
          xid    CDATA #IMPLIED>
<!-- A table is really a special type of section. 
     Tables are collections of cells. -->

<!ELEMENT cell   (p | table)+>
<!ATTLIST cell
          props  CDATA #IMPLIED
	  xid    CDATA #IMPLIED>
<!-- Cells are collections of paragraphs 
     or embedded tables -->

<!ELEMENT frame   (p | table)*>
<!ATTLIST frame
          props  CDATA #IMPLIED
          xid    CDATA #IMPLIED>
<!-- A frame is a container similar to a section. -->