summaryrefslogtreecommitdiffstats
path: root/kword/dtd/kword.dtd
blob: b0ccef2df2d273bfe71de8c0b656b17793f05581 (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
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
<!--    $Id: kword.dtd 466158 2005-10-01 19:30:05Z dfaure $

This is an XML document type definition (DTD) for the KWord document format.
Written by Kalle Dalheimer <kalle at kde dot org> with (obviously) input from KWord's
author Reginald Stadlbauer <reggie at kde dot org>.

Kword DTD version 2 has been created by Thomas Zander, but only small adjustments from
the original version were made.

(In case of questions about this file, please ask one of the KOffice mailing lists!)

About the version
=================

This is the DTD version 3, for KWord 1.3

The DTD version 1 was used by KWord-0.8 (KOffice-1.0, the one included in KDE-2.0)
The DTD version 2 was used by KWord-1.1 and KWord-1.2

KWord will read the previous versions of its own file format but this is considered
the most complete format, we highly encourage you to use this format.

Version 3 specifics that have another meaning when read by earlier versions of KWord:
* counter: depth and display-levels have been separated, older versions assume display-levels=depth+1
* TOC: outline and numberingtype=1 have been separated, older versions assume outline if nt=1

KWord overview
==============

The main structure of each KWord document is a header and a body. The header
contains things like the paper size, the margins and so on.

The body is organised around the concept of frames. You might have noticed
that you can do nearly everything with the frames in your KWord document (e.g.
move them around, interlock them, let your text "flow" through them, etc.). To
achieve this flexibility, the body actually has to store the data in a
hierarchy including framesets, frames, paragraphs, and so on.

Framesets hold the actual text. Frames represent the rectangles in which this
text is "flowed".

Encoding (for advanced users)
=============================

KWord's document are encoded as UTF-8 by definition. Please use this encoding
whenever possible. (Remember: ASCII is UTF-8 too and you could use numerical 
character references like &#8164; to keep your document ASCII-clean.)

If you find that writing in UTF-8 is too difficult on the system that you plan
to use, then please use ISO-10646-UCS2 (also known as UTF-16.)

Please write publicly available KWord documents only in one of these two encodings!

Of course, if you do not use UTF-8, replace any occurrence of UTF-8 in the text below by the
encoding that you have chosen. And please be sure to correctly define the XML declaration <?xml

(Sorry, ISO-10646-UCS4 (also known as UTF-32) is not available, as QT cannot handle it.)

Some basic notes on XML
=======================

- All kinds of numbers are stored like this: foo="1" (between " and " :)

- A rational number looks like this: width="1.03" (note: the '.' separates
integer and fractional parts).

- <XYZ foo="100" bar="0"/> equals <XYZ foo="100" bar="0"></XYZ>

- Unicode-letters (UTF-8 coded) are used to store the text

- Some special characters ('<', '>', '&', '"', ''') are or can be "escaped" ('&lt;', '&gt;', '&amp;', '&quot;', '&apos;')
Only these characters can be "escaped". XML cannot handle other "escapes", for example those of HTML are not valid (e.g. &eacute; .)

- Please launch KWord and save an empty file - it is much easier to follow
this documentation if you wade through an (almost empty) example document.

- The XML begins with a special tag like this (it is called the XML declaration):

    <?xml version="1.0" encoding="UTF-8"?>

Each file starts with this tag. Note: You must not "close" this tag (i.e.
don't put a </?xml...> at the end of the file!).

-->

<!--    A KWord document consists of a paper description, a number of
        attributes and the framesets which contain the actual data. It
        can also define a number of styles.

        Attributes:

            editor:         The program this file was written with.

            mime:           The MIME type (must always have the value
                            application/x-kword).

            syntaxVersion:  Integer version of the syntax in the remainder of
                            this file:

                                1...as for KWord 0.8 (KOffice-1.0)
                                2...as for KWord 1.1 or 1.2
                                3...as for KWord 1.3
                            KWord can read all previous versions, but always saves in the latest.
-->
<!ELEMENT DOC
    (PAPER, ATTRIBUTES, VARIABLESETTINGS, FOOTNOTESETTING, ENDNOTESETTING, FRAMESETS, STYLES, PICTURES, PIXMAPS, CLIPARTS, SERIALL, (EMBEDDED*), SPELLCHECKIGNORELIST, BOOKMARKS)>
<!ATTLIST DOC
    editor CDATA #IMPLIED
    mime CDATA #FIXED "application/x-kword"
    syntaxVersion CDATA #REQUIRED>

<!--    Describes the page format. Can have no or one PAPERBORDERS child that
        describes the margins. Normally this is the first tag in the "header".

        Attributes:

            format:         integer value for the page format:

                                0...DIN A3
                                1...DIN A4
                                2...DIN A5
                                3...US LETTER
                                4...US LEGAL
                                5...SCREEN (screen sized)
                                6...CUSTOM (just enter your preferred size)
                                7...DIN B5
                                8...US EXECUTIVE
                                etc. See the enum in koffice/lib/kofficeui/koGlobal.h

            width:          width in pt.

            height:         height in pt.

            orientation:    page orientation:

                                0...Portrait
                                1...Landscape

            columns:        the number of columns (only in wordprocessing
                            mode).

            pages:          the number of pages. This is saved for information purposes,
                            but not required nor used by KWord.

            columnspacing:  the gap (in pt) between the columns (only in
                            wordprocessing mode).

            hType:          header style:

                                0...same on all pages
                                1...different on first, even and odd pages (2&3)
                                2...different on first and other pages
                                3...different on even and odd pages

            fType:          footer style:

                                0...same on all pages
                                1...different on first, even and odd pages (2&3)
                                2...different on first and other pages
                                3...different on even and odd pages

            spHeadBody:     distance (in pt) between headers and the text body (only in
                            wordprocessing mode).

            spFootBody:     distance (in pt) between footers and the text body (only in
                            wordprocessing mode).
            spFootNoteBody: distance ( in pt ) betwwen footnote and text body

            slFootNotePosition: position of footnote separator line
                                centered, right, left

            slFootNoteLength:   percentage of page width default is 20
            slFootNoteWidth:    width of line seperator default = 2pt
            slFootNoteType:     type of line seperator solid, dot, dash etc...
-->
<!ELEMENT PAPER
    (PAPERBORDERS?)>
<!ATTLIST PAPER
    format CDATA #REQUIRED
    width CDATA #REQUIRED
    height CDATA #REQUIRED
    orientation CDATA #REQUIRED
    columns CDATA #REQUIRED
    columnspacing CDATA #REQUIRED
    pages CDATA #IMPLIED
    hType CDATA #IMPLIED
    fType CDATA #IMPLIED
    spHeadBody CDATA #IMPLIED
    spFootBody CDATA #IMPLIED
    spFootNoteBody CDATA #IMPLIED
    slFootNotePosition CDATA #IMPLIED
    slFootNoteLength CDATA #IMPLIED
    slFootNoteWidth CDATA #IMPLIED
    slFootNoteType CDATA #IMPLIED>


<!--    Describes the margins of the page.

        Attributes:

            left:           left margin in pt.

            right:          right margin in pt.

            top:            top margin in pt.

            bottom:         bottom margin in pt.
-->
<!ELEMENT PAPERBORDERS
    EMPTY>
<!ATTLIST PAPERBORDERS
    left CDATA #REQUIRED
    right CDATA #REQUIRED
    top CDATA #REQUIRED
    bottom CDATA #REQUIRED>


<!--    Contains general attributes of the document. Has no children.

        Attributes:

            processing:     0..."Normal" document (Wordprocessing)
                            1...DTP-document (DTPing)

            standardpage:   currently ignored.

            hasHeader:      0...the document has no headers
                            1...the document has headers

            hasFooter:      0...the document has no footers
                            1...the document has footers

            unit:           Basic unit for positioning, ruler,...
                            This has no influence on the units in this document, only on what the user sees.
                                mm...
                                pt...
                                inch...

            hasTOC:         0...the document has no TOC
                            1...the document has TOC

            tabStopValue:   tabstop value in pt

            activeFrameset: the name of the frameset that was edited when saving the document
            cursorParagraph:if activeFrameset is a text frameset, the paragraph ID of the cursor
            cursorIndex:    if activeFrameset is a text frameset, the character index of the cursor
-->
<!ELEMENT ATTRIBUTES
    EMPTY>
<!ATTLIST ATTRIBUTES
    processing CDATA #REQUIRED
    standardpage CDATA #IMPLIED
    hasHeader CDATA #IMPLIED
    hasFooter CDATA #IMPLIED
    unit CDATA #IMPLIED
    hasTOC CDATA #IMPLIED
    tabStopValue CDATA #IMPLIED
    activeFrameset CDATA #IMPLIED
    cursorParagraph CDATA #IMPLIED
    cursorIndex CDATA #IMPLIED>


<!--    Contains general attributes variables. Has no children.

        Attributes:
            startingPageNumber:     the starting page number.
            displaylink             ### TODO: document!
            underlinelink:          Underline links by default (true/false)
            displaycomment:         Display comment (true/false)
            displayfieldcode:       Display the name of the variables if true (instead of their value)
            lastPrintingDate:       Last printing date, in ISO-8601 format
            creationDate:           Creation date of the document, in ISO-8601 format
            modificationDate:       Modification date of the document, in ISO-8601 format
-->
<!ELEMENT VARIABLESETTINGS
    EMPTY>
<!ATTLIST VARIABLESETTINGS
    startingPageNumber CDATA #IMPLIED
    displaylink CDATA #IMPLIED
    underlinelink CDATA #IMPLIED
    displaycomment CDATA #IMPLIED
    displayfieldcode CDATA #IMPLIED
    lastPrintingDate CDATA #IMPLIED
    creationDate CDATA #IMPLIED
    modificationDate CDATA #IMPLIED>


<!--    Contains general attributes for footnote.

        Attributes:    see counter !

        Ignore bullet, restart and depth.
-->
<!ELEMENT FOOTNOTESETTING
    EMPTY>
<!ATTLIST FOOTNOTESETTING
    type CDATA #REQUIRED
    depth CDATA #REQUIRED
    bullet CDATA #IMPLIED
    start CDATA #IMPLIED
    numberingtype CDATA #IMPLIED
    lefttext CDATA #IMPLIED
    righttext CDATA #IMPLIED
    bulletfont CDATA #IMPLIED
    customdef CDATA #IMPLIED
    restart CDATA #IMPLIED>

<!--    Contains general attributes for endnote.

        Attributes: see counter !

        Ignore bullet, restart and depth.
-->
<!ELEMENT ENDNOTESETTING
    EMPTY>
<!ATTLIST ENDNOTESETTING
    type CDATA #REQUIRED
    depth CDATA #REQUIRED
    bullet CDATA #IMPLIED
    start CDATA #IMPLIED
    numberingtype CDATA #IMPLIED
    lefttext CDATA #IMPLIED
    righttext CDATA #IMPLIED
    bulletfont CDATA #IMPLIED
    customdef CDATA #IMPLIED
    restart CDATA #IMPLIED>


<!--    Container that has a number of FRAMESET children.
-->
<!ELEMENT FRAMESETS
    (FRAMESET+)>


<!--    A frameset that bundles a number of FRAME elements (at least one).
        In addition it can have a more specific element, depending on frameType.

        Attributes:

            frameType:      0...Base frame (for internal use only!!!)
                            1...Text frame (contains PARAGRAPH tags)
                            2...Picture frame (contains a PICTURE tag, or an IMAGE tag for KWord 1.1)
                            3...Part frame (defined in EMBEDDED at the doc level) ### FIXME: does not happen in a FRAMESET but only in SETTINGS
                            4...Formula frame (contains a FORMULA tag)
                            5...Clipart frame (contains a CLIPART tag, only for KWord 1.1)
                            6...Horizontal line frame (contains a PICTURE tag)
                            10..reserved (internally for tables)

            frameInfo:      0...normal text (or non-text frame)
                            1...header for first page
                            2...header for even pages (user-wise, i.e. with pages starting at 1)
                            3...header for odd pages (user-wise, i.e. with pages starting at 1)
                            4...footer for first page
                            5...footer for even pages (user-wise, i.e. with pages starting at 1)
                            6...footer for odd pages (user-wise, i.e. with pages starting at 1)
                            7...footnote
                            When the document uses the same headers on even and odd pages (hType=0,2),
                            the header being used is the one for odd pages (frameInfo=3).

            removable:      Whether the header-frame is removable or not:
                            Used in tables where header cells on new pages are
                            auto created with this set to 1.
                                0...no (default)
                                1...yes

            visible:        Whether the frame is visible or not:

                                0...no
                                1...yes (default)

            grpMgr:         If present, indicates that this frameset is
                            a cell in a table. The value is the name of the
                            group manager for this table. (i.e. If this
                            frameset "belongs" to a table the position and the
                            size are contolled by a group manager (one for
                            each table)).

            row:            Position in the table (only for tables). Index
                            starts at 0. The index for the next row must equal
                            the index for the current row, plus the
                            value of "rows" for the current row.

            col:            Ditto for columns.

            rows:           Size of this cell in rows (only for tables).
                            can be 1 or greater.

            cols:           Ditto for columns.

            protectContent: Protect content of text object

            protectSize:    Prevent user from changing size and position
                            of the frames in this frameset.

                                0...no (default)
                                1...yes


-->
<!ELEMENT FRAMESET
    (FRAME|PARAGRAPH|PICTURE|IMAGE|CLIPART|FORMULA)*>  <!-- ### missing: defining FORMULA -->
<!ATTLIST FRAMESET
    name CDATA #REQUIRED
    frameType CDATA #REQUIRED
    frameInfo CDATA #REQUIRED
    removable CDATA #IMPLIED
    visible CDATA #IMPLIED
    grpMgr CDATA #IMPLIED
    row CDATA #IMPLIED
    col CDATA #IMPLIED
    rows CDATA #IMPLIED
    cols CDATA #IMPLIED
    protectContent CDATA #IMPLIED
    protectSize CDATA #IMPLIED>

<!ELEMENT FRAME
    EMPTY>

<!--    Describes a frame of a frameset.

        Attributes:

            right, left, top,
            bottom:             absolute coordinates in pt.

            min-height:         If set (and >0), this is the minimum height. Applies to AutoExtendFrame.

            runaround:          0...No run around, the text runs through the frame
                                1...Frame repels text in overlapping frames
                                2...Text in overlapping frames will avoid the
                                    complete horizontal space of this frame.

            runaroundSide:      when runaround is 1 specify here the side of the frame
                                on which the text should flow.
                                Values: "left", "right" or "biggest". Default is biggest.

            runaroundGap:       when runaround is 1 specify here the distance (in pt)
                                between overlapping frames and runaround text

            autoCreateNewFrame: What to do if the text is bigger than the frame:
                                0...AutoExtendFrame (use this for headers/footers)
                                    Make frame bigger to fit text.
                                1...AutoCreateNewFrame (use this for the normal text body)
                                    Place a new frame on next page.
                                2...Ignore extra text

            newFrameBehaviour:  DEPRECATED use newFrameBehavior instead.
            newFrameBehavior:   0...On creating a new page, reconnect frame
                                    to current frameset (use this for the normal text body).
                                1...Don't create a followup frame on the new
                                    page.
                                2...This frame will be shown on the new page
                                    as well (with the same content)

            copy:               0...Not a copy
                                1...This frame is a copy of the previous frame in this frameset
                                (default is 1 for headers and footers and 0 for the others)

            sheetSide:          0...AnySide
                                1...this frame will only be shown on odd pages
                                2...this frame will only be shown on even pages

            lWidth, rWidth, tWidth, bWidth:  width (in pt) of a frame border (left, right, top, bottom)

            lRed, lGreen, lBlue:   color (rgb) of the left frame border
            rRed, rGreen, rBlue:   color (rgb) of the right frame border
            tRed, tGreen, tBlue:   color (rgb) of the top frame border
            bRed, bGreen, bBlue:   color (rgb) of the bottom frame border

            lStyle, rStyle, tStyle, bStyle:  style of a frame border (left, right, top, bottom)
                                             Solid = 0, Dash = 1, Dot = 2, Dash_dot = 3, Dash_dot_dot = 4

            bkRed, bkGreen, bkBlue: color (rgb) used as the frame's background color
            bkStyle : style of a frame background color
            None = 0, SolidPattern = 1, Dense1Pattern = 2, Dense2Pattern = 3, Dense3Pattern = 4, Dense4Pattern = 5 etc... (look at in qbrush documentation)

            bleftpt, brightpt, btoppt, bbottompt: frame margins (internal to the frame)

            z-index: z index (signed int).
                     Relative to the other frame in the same page.
                     The frame with the biggest z index in a given page, is on top.
-->
<!ATTLIST FRAME
    left CDATA #REQUIRED
    right CDATA #REQUIRED
    top CDATA #REQUIRED
    bottom CDATA #REQUIRED
    min-height CDATA #IMPLIED
    runaround CDATA #IMPLIED
    runaroundSide CDATA #IMPLIED
    runaroundGap CDATA #IMPLIED
    autoCreateNewFrame CDATA #IMPLIED
    newFrameBehavior CDATA #REQUIRED
    copy CDATA #IMPLIED
    sheetSide CDATA #IMPLIED
    lWidth CDATA #IMPLIED
    rWidth CDATA #IMPLIED
    tWidth CDATA #IMPLIED
    bWidth CDATA #IMPLIED
    lRed CDATA #IMPLIED
    lGreen CDATA #IMPLIED
    lBlue CDATA #IMPLIED
    rRed CDATA #IMPLIED
    rGreen CDATA #IMPLIED
    rBlue CDATA #IMPLIED
    tRed CDATA #IMPLIED
    tGreen CDATA #IMPLIED
    tBlue CDATA #IMPLIED
    bRed CDATA #IMPLIED
    bGreen CDATA #IMPLIED
    bBlue CDATA #IMPLIED
    lStyle CDATA #IMPLIED
    rStyle CDATA #IMPLIED
    tStyle CDATA #IMPLIED
    bStyle CDATA #IMPLIED
    bkRed CDATA #IMPLIED
    bkGreen CDATA #IMPLIED
    bkBlue CDATA #IMPLIED
    bkStyle CDATA #IMPLIED
    bleftpt CDATA #IMPLIED
    brightpt CDATA #IMPLIED
    btoppt CDATA #IMPLIED
    bbottompt CDATA #IMPLIED
    z-index CDATA #IMPLIED>

<!ELEMENT PARAGRAPH
    (TEXT|FORMATS|LAYOUT)*>

<!--    Just guess :) The text is stored as UTF-8 coded Unicode
        glyphs. Note: the format-tags navigate in the text using an index
        which starts at 0 and runs up till it reaches length-1.

        Some special character codes map to special features:
            0xad is a soft hyphen
            0xa0 is a non-breaking space
            0x2011 is a non-breaking hyphen
            \n is a linebreak (within the paragraph)
            \t is a tabulator

        Attributes:

             xml:space:          "preserve" tells parsers to keep white spaces
-->
<!ELEMENT TEXT
    (#PCDATA)>
<!ATTLIST TEXT
    xml:space (preserve) #FIXED "preserve">

<!--    List of formats that apply to a given paragraph
-->
<!ELEMENT FORMATS
    (FORMAT*)>

<!--    A format tag describes the format of one or more characters in the
        text.

        Attributes:

            id:                 type of format information:

                                    0...none (mustn't be in a file)
                                    1..."normal" text
                                    2...a picture - in that case, only IMAGE is specified.
                                                    This is DEPRECATED, use a floating frame instead.
                                    3...tabulator - Not supported anymore. Use a '\t' in the text instead.
                                    4...a variable - in that case, VARIABLE is also specified
                                    5...a footnote - DEPRECATED (KOffice-1.0)
                                    6...an anchor for a floating frame - in that case, only ANCHOR is specified.

            pos:                position where the format starts. This is a
                                zero-based index into the text of the
                                paragraph.

            len:                number of characters after pos for which the
                                format is used. 1 for all ids except "normal text".

        When FORMAT is used to specify the format of a style, pos and len are omitted.
-->
<!ELEMENT FORMAT
    (COLOR|FONT|SIZE|WEIGHT|ITALIC|UNDERLINE|STRIKEOUT|VERTALIGN|SHADOW|FONTATTRIBUTE|LANGUAGE|ANCHOR|IMAGE|PICTURE|VARIABLE|TEXTBACKGROUNDCOLOR|OFFSETFROMBASELINE)*>


<!ATTLIST FORMAT
    id CDATA #REQUIRED
    pos CDATA #IMPLIED
    len CDATA #IMPLIED>


<!-- LAYOUT
        A layout holds all the attributes related to a paragraph,
        other than its text and formatting.
        Each of the child elements can be present only once, except
        TABULATOR which can be repeated.
        The FORMAT tag here is the 'default format' for the paragraph.
-->
<!ENTITY % layout "NAME|FLOW|INDENTS|OFFSETS|LINESPACING|PAGEBREAKING|
    LEFTBORDER|RIGHTBORDER|TOPBORDER|BOTTOMBORDER|COUNTER|FORMAT|
    TABULATOR*">
<!ELEMENT LAYOUT
    (%layout;)*>

<!--
        A style is a global setting that is used for all paragraphs which use that
        style. As the markup is stored in one place (the style) changing the markup
        throughout the document is simply a task of changing one or two styles.
        Highly recommended for structured documents.

        A style element contains the same child elements as the LAYOUT tag:
        all the paragraph properties, as well as a text format.
        It also contains the name of the following style, i.e. the one used when
        the user presses Enter in a paragraph using this style.

        Attributes:
          outline   if "true", this style is part of the Table Of Contents.
                    (by default it is not).
-->
<!ELEMENT STYLES
    (STYLE*)>
<!ELEMENT STYLE
    (%layout;|FOLLOWING)*>
<!ATTLIST STYLE
    outline CDATA #IMPLIED>

<!--
        Defines the color of the text, using RGB.
        (-1,-1,-1) means "default color", i.e. the base color from the color scheme
        (usually black).
-->
<!ELEMENT COLOR
    EMPTY>
<!ATTLIST COLOR
    red CDATA #REQUIRED
    green CDATA #REQUIRED
    blue CDATA #REQUIRED>

<!--
        Defines the background color of the text (aka "highlight"), using RGB.
        (-1,-1,-1) means "default color", i.e. the base color from the color scheme
        (usually white).
-->
<!ELEMENT TEXTBACKGROUNDCOLOR
    EMPTY>
<!ATTLIST TEXTBACKGROUNDCOLOR
    red CDATA #REQUIRED
    green CDATA #REQUIRED
    blue CDATA #REQUIRED>


<!--
        A framestyle holds properties for borders, background and can be identified with a name.
-->
<!ELEMENT FRAMESTYLES
    (FRAMESTYLE*)>
<!ELEMENT FRAMESTYLE
    (NAME|LEFTBORDER|RIGHTBORDER|TOPBORDER|BOTTOMBORDER)>
<!ATTLIST FRAMESTYLE
    red CDATA #REQUIRED
    green CDATA #REQUIRED
    blue CDATA #REQUIRED>


<!--
        A tablestyle holds properties for borders, background and (text)style. A tablestyle is
        identified via its name. The properties are reach via the names corresponding to the
        framestyle and style.
-->
<!ELEMENT TABLESTYLES
    (TABLESTYLE*)>

<!ELEMENT TABLESTYLE
    (NAME|PSTYLE|PFRAMESTYLE)>

<!ELEMENT PFRAMESTYLE
    EMPTY>
<!ATTLIST PFRAMESTYLE
    name CDATA #REQUIRED>

<!ELEMENT PSTYLE
    EMPTY>
<!ATTLIST PSTYLE
    name CDATA #REQUIRED>
            
    
<!--
        name is the family name. Don't include fontsizes or bold, that is put in another tag.
-->
<!ELEMENT FONT
    EMPTY>
<!ATTLIST FONT
    name CDATA #REQUIRED>

<!-- SIZE
        When size is used in a format the size is in points.
-->
<!ELEMENT SIZE
    EMPTY>
<!ATTLIST SIZE
    value CDATA #REQUIRED>

<!-- WEIGHT
        Weight of a font is it's Boldness. Look at the QFont weight description for precise
        numbers. Use normal=50, bold=75.
-->
<!ELEMENT WEIGHT
    EMPTY>
<!ATTLIST WEIGHT
    value CDATA #REQUIRED>

<!-- ITALIC
        Value is either 0 or 1 with 1=true and 0=false
-->
<!ELEMENT ITALIC
    EMPTY>
<!ATTLIST ITALIC
    value CDATA #REQUIRED>

<!-- UNDERLINE
        Value is either 0 or 1 or single or double or single-bold
          0 = no underline
          1 or single = single underline
          double = double-underline.
          single-bold = thick underline
          wave = wave underline
        styleline type of underline 
                : solid, dash, dot, dashdot, dashdotdot
        underlinecolor : color of underline line.
        wordbyword: 0 or 1. If 1, spaces are not underlined. Opposite of fo:score-spaces.

-->
<!ELEMENT UNDERLINE
    EMPTY>
<!ATTLIST UNDERLINE
    value CDATA #REQUIRED
    styleline CDATA #REQUIRED
    underlinecolor CDATA #REQUIRED
    wordbyword CDATA #REQUIRED>

<!-- STRIKEOUT
        value: 0, 1 (or single), double, single-bold (see UNDERLINE)
        styleline: style of strikeout line solid, dash, dot, dashdot, dashdotdot
        wordbyword: 0 or 1. If 1, spaces are not striked out. Opposite of fo:score-spaces.
-->
<!ELEMENT STRIKEOUT
    EMPTY>
<!ATTLIST STRIKEOUT
    value CDATA #REQUIRED
    styleline CDATA #REQUIRED
    wordbyword CDATA #REQUIRED>

<!-- VERTALIGN
            Super/sub script.
            value: 0 = Normal
                   1 = Subscript
                   2 = Superscript
            relativetextsize: 0.75 means 3/4 of the normal font size.
-->
<!ELEMENT VERTALIGN
    EMPTY>
<!ATTLIST VERTALIGN
    value CDATA #REQUIRED
    relativetextsize CDATA #REQUIRED>

<!-- SHADOW
        The value is the CSS specification for text-shadow (also used by XSL-FO).
        http://www.w3.org/TR/REC-CSS2/text.html#text-shadow-props
        KWord only supports a single shadow, and no blur radius, so it amounts to
        either "none" or "color length length".
-->
<!ELEMENT SHADOW
    EMPTY>
<!ATTLIST SHADOW
    text-shadow CDATA #REQUIRED>


<!-- OFFSETFROMBASELINE
        Value is define in pt
-->
<!ELEMENT OFFSETFROMBASELINE
    EMPTY>
<!ATTLIST OFFSETFROMBASELINE
    value CDATA #REQUIRED>

<!-- FONTATTRIBUTE
        Value is either "none", "smallcaps", "uppercase", or "lowercase"
-->
<!ELEMENT FONTATTRIBUTE
    EMPTY>
<!ATTLIST FONTATTRIBUTE
    value CDATA #REQUIRED>

<!-- LANGUAGE
        The name of the language used by this text span.
        This is usually a two letters code, or ll_CC where a country is specified.
-->
<!ELEMENT LANGUAGE
    EMPTY>
<!ATTLIST LANGUAGE
    value CDATA #REQUIRED>


<!-- NAME
        The name of a style.
        If inside a <STYLE> tag, this defines the name of the style.
        If inside a <LAYOUT> tag, this refers to an existing style,
        to be used for this paragraph.
-->
<!ELEMENT NAME
    EMPTY>
<!ATTLIST NAME
    value CDATA #REQUIRED>

<!-- FOLLOWING
        The FOLLOWING tag is a styles tag. You can only embed it in a style.
        With this tag you can tell kword to switch to the style 'name' after
        enter was pressed and the current style was used.
        Example: Style H1 has the <following name="body"> tag. When the user is
        finished typing the header tag and presses enter kword switches to the
        style 'body'
        The style-name given should be available.
-->
<!ELEMENT FOLLOWING
    EMPTY>
<!ATTLIST FOLLOWING
    name CDATA #REQUIRED>

<!-- FLOW
        FLOW is a paragraph and style tag, that determines the alignment of the text.
        align's value is one of: 'left', 'right', 'center', 'justify'
        It can also be 'auto' for styles, meaning right for RTL text, left otherwise.

        dir: Indicates the direction of the paragraph. 'L' or 'R' for left-to-right and right-to-left.
        Automatic direction (dependent on first character) is the default.
-->
<!ELEMENT FLOW
    EMPTY>
<!ATTLIST FLOW
    align (left|right|center|justify|auto) #REQUIRED
    dir (L|R) #IMPLIED>

<!-- INDENTS
        left: indent (pt) that is used for the other lines in a paragraph.
        right: indent (pt) on the right of all lines in the paragraph
        first: indent (pt) from the left border (of the frame) of the first line of a paragraph.
               This indent is added from the left indent (or to the right indent
               in a right-to-left paragraph).
        If not specified, the default value is 0.
-->
<!ELEMENT INDENTS
    EMPTY>
<!ATTLIST INDENTS
    first CDATA #IMPLIED
    left CDATA #IMPLIED
    right CDATA #IMPLIED>

<!-- OFFSETS
        before: space before the paragraph, or "head offset" (KWord-0.8), aka "top margin" (KWord-1.0) (pt)
        after: space after the paragraph, or "foot offset" (KWord-0.8), aka "bottom margin" (KWord-1.0) (pt)
        If not specified, the default value is 0.
-->
<!ELEMENT OFFSETS
    EMPTY>
<!ATTLIST OFFSETS
    before CDATA #IMPLIED
    after CDATA #IMPLIED>

<!--
        A paragraph and a style can have counter data.
        The document will do the counting of the paragraphs that use this.

        type:   0 = None
                1 = Numeral
                2 = Alphabetical
                3 = Alphabetical uppercase
                4 = Roman numbering
                5 = Roman numbering uppercase
                6 = Custom bullet (one char, set by the 'bullet' attribute)
                7 = Custom (complex string, see kword's dialog)
                8 = Circle bullet (empty circle)
                9 = Square bullet (full square)
                10 = Disc bullet (full circle)
                11 = Box bullet (empty square)

        depth   The level of the numbering.
                Depth of 0 means the major numbering. (1, 2, 3...)
                Depth of 1 is 1.1, 1.2, 1.3 etc.

        start   The first used number in the numbering (usually 1).
                List numbering starts at <start> initially, or when restart is set to true.
        numberingtype
                0 = list numbering, 1 = chapter numbering.
                Chapter numbering is used throughout the whole document (in future throughout books)
        lefttext
                The text that is printed left of the first numeral
        righttext
                The text that is printed right of the last numeral
                A usual value for this one is "." (dot).

        bullet  The unicode character code that is the custom bullet (for type=6)
        bulletfont
                The font to use for the custom bullet can be found in (use "symbol" if in doubt)
        customdef
                Definition of a custom counter - not supported yet
        restart
                If "true" or "1", this paragraph is numbered as specified by start.
                Otherwise (default) it will extend the current list (with equal type and depth).

        text    The text shown by the counter in the document when it was saved.
                This is redundant information, unused by KWord upon loading, but useful
                for export filters.

        display-levels Number of levels to display (e.g. 3 means "1.2.1")

        align   Counter alignment. Possible values include:
	            int(TQt::AlignAuto), //left for LTR text and right for RTL text
		    int(TQt::AlignLeft),
		    int(TQt::AlignRight).
-->
<!ELEMENT COUNTER
    EMPTY>
<!ATTLIST COUNTER
    type CDATA #REQUIRED
    depth CDATA #REQUIRED
    bullet CDATA #IMPLIED
    start CDATA #IMPLIED
    numberingtype CDATA #REQUIRED
    lefttext CDATA #IMPLIED
    righttext CDATA #IMPLIED
    bulletfont CDATA #IMPLIED
    customdef CDATA #IMPLIED
    restart CDATA #IMPLIED
    text CDATA #IMPLIED
    display-levels CDATA #IMPLIED
    align CDATA #IMPLIED>

<!--
        Linespacing defines the height of a line in a paragraph.
        By default the line height is the height of the biggest character in the line.

        The "type" can be "oneandhalf" for 1.5 * line_height and "double" for 2 * line_height.
        More generally it can also be "multiple", where spacingvalue=3 means 3 * line_height.
        Other values for the type are
        "custom": spacingvalue is the distance between the lines in pt (added to the line height)
        "atleast": the total line height is at least spacingvalue (in pt)
        "fixed": spacingvalue is equal to the total line height (in pt).

        See koffice/lib/kotext/koparaglayout.h for more details.

        spacingvalue isn't used if type is "oneandhalf" or "double".

        Compatibility note: KWord-1.1 only had a "value" attribute, which could
        be set to a pt value (for custom), to "oneandhalf" or to "double".
-->
<!ELEMENT LINESPACING
    EMPTY>
<!ATTLIST LINESPACING
    type (oneandhalf|double|custom|atleast|multiple|fixed) #IMPLIED
    spacingvalue CDATA #IMPLIED>

<!--
        Attributes relating to the way paragraphs are broken at the end of a frame/page.
        If this element isn't specified, the default is to break between lines of a parag.

        linesTogether: if "true", all the lines of a given paragraph remain together.
        hardFrameBreak: if "true", this paragraph is always at the beginning of a frame.
        hardFrameBreakAfter: if "true", this paragraph is always the last in the frame.

        Future extensions: keepWithPrevious, keepWithNext
-->
<!ELEMENT PAGEBREAKING
    EMPTY>
<!ATTLIST PAGEBREAKING
    linesTogether       (true|false) #IMPLIED
    hardFrameBreak      (true|false) #IMPLIED
    hardFrameBreakAfter (true|false) #IMPLIED>

<!--
        The borders can be used on a frame and on a paragraph.
        the border has a color, displayed in the RGB value.
        The width is in points.
        Style   0 = solid
                1 = dashes
                2 = dots
                3 = dash - dot patterns
                4 = dash dot dot patterns
                5 = double line
-->
<!ELEMENT LEFTBORDER
    EMPTY>
<!ATTLIST LEFTBORDER
    red CDATA #REQUIRED
    green CDATA #REQUIRED
    blue CDATA #REQUIRED
    style CDATA #REQUIRED
    width CDATA #REQUIRED>
<!ELEMENT RIGHTBORDER
    EMPTY>
<!ATTLIST RIGHTBORDER
    red CDATA #REQUIRED
    green CDATA #REQUIRED
    blue CDATA #REQUIRED
    style CDATA #REQUIRED
    width CDATA #REQUIRED>
<!ELEMENT TOPBORDER
    EMPTY>
<!ATTLIST TOPBORDER
    red CDATA #REQUIRED
    green CDATA #REQUIRED
    blue CDATA #REQUIRED
    style CDATA #REQUIRED
    width CDATA #REQUIRED>
<!ELEMENT BOTTOMBORDER
    EMPTY>
<!ATTLIST BOTTOMBORDER
    red CDATA #REQUIRED
    green CDATA #REQUIRED
    blue CDATA #REQUIRED
    style CDATA #REQUIRED
    width CDATA #REQUIRED>

<!--    Defines the position of a tabulation
        Attributes:

            type:               0 .. left
                                1 .. center
                                2 .. right
                                3 .. alignment at specified character

            ptpos:              Position of the tabulation, in pt

            filling:            0 .. blank
                                1 .. dots
                                2 .. line
                                3 .. dash
                                4 .. dash-dot
                                5 .. dash-dot-dot

            width:              Width of the filling, in pt

            alignchar:          character at which text will be aligned when
                                type==3 (former "decimal point") is set
-->
<!ELEMENT TABULATOR
    EMPTY>
<!ATTLIST TABULATOR
    type CDATA #REQUIRED
    ptpos CDATA #REQUIRED
    filling CDATA #IMPLIED
    width CDATA #IMPLIED
    alignchar CDATA #IMPLIED>

<!--    An anchor describes an object which is anchored.

        Attributes:

            type:               What kind of object is being anchored?

                                    grpMgr: a table [deprecated]
                                    frameset: a frameset [default]

            instance:           An identifier that uniquely names the
                                particular instance of the type of object
                                being anchored.
                                For framesets, this is the frameset name.
-->

<!ELEMENT ANCHOR
    EMPTY>
<!ATTLIST ANCHOR
    type CDATA #REQUIRED
    instance CDATA #REQUIRED>

<!--    Definition of a picture - contains only one element, the key to the picture.
-->
<!ELEMENT PICTURE
    (KEY)>
<!ATTLIST PICTURE
    keepAspectRatio CDATA #REQUIRED>

<!--    Definition of an image - contains only one element, the key to the image.
        Only for KWord 1.1. compatibility
-->
<!ELEMENT IMAGE
    (KEY)>
<!ATTLIST IMAGE
    keepAspectRatio CDATA #REQUIRED>

<!--    Definition of a clipart - contains only one element, the key to the clipart.
        Only for KWord 1.1. compatibility
-->
<!ELEMENT CLIPART
    (KEY)>

<!--    Variable
        A variable has always two child elements:
        TYPE, and another one depending on the type.
-->
<!ELEMENT VARIABLE
    (TYPE,(DATE|TIME|PGNUM|CUSTOM|MAILMERGE|FIELD|LINK|NOTE|FOOTNOTE))>

<!--    Variable type
        Attributes:
        type
            0... Date (uses DATE to save it)
            1... [currently unused]
            2... Time fixed (uses TIME to save it)
            3... [currently unused]
            4... Page number / number of pages (uses PGNUM to save it)
            5... [currently unused]
            6... Custom (uses CUSTOM to save it)
            7... Mail Merge variable (uses MAILMERGE to save it)
            8... Field (uses FIELD to save it)
            9... Link (uses LINK)
            10... Note (uses NOTE)
            11... Footnote (uses FOOTNOTE)
	    12... Statictic (uses STATISTIC)

        key  the description of the variable format used to display this variable.
            The first 4 letters identify the class of format:
            DATE = a date
            TIME = a time
            NUMB = a number
            STRI = a string
            The rest (after the 4 letters) is quite internal, and depends on the type of variable.

        text the text shown by the variable in the document when it was saved.
            This is redundant information, unused by KWord upon loading, but useful
            for export filters.
-->
<!ELEMENT TYPE
    EMPTY>
<!ATTLIST TYPE
    type CDATA #REQUIRED
    key  CDATA #IMPLIED
    text CDATA #IMPLIED>

<!--   Date value contained in a date variable.
        day...  the day number
        month.. the month number
        year... the year number
        fix.... 1 if the time is fixed, 0 if it's variable ("the current time")
        correct... adjustement
        subtype...
           0 = fixed date, will never update itself automatically
           1 = current date, updated as soon as the file is loaded
               The value in the file is the value that the var had when saving.
           2 = date of last printing
           3 = date of file creation
           4 = date of last modification
-->
<!ELEMENT DATE
    EMPTY>
<!ATTLIST DATE
    day   CDATA #REQUIRED
    month CDATA #REQUIRED
    year  CDATA #REQUIRED
    fix   CDATA #REQUIRED
    correct CDATA #IMPLIED
    subtype CDATA #REQUIRED
    hour   CDATA #IMPLIED
    minute CDATA #IMPLIED
    second CDATA #IMPLIED>

<!--   Time value contained in a time variable.
        hour...  the hour number
        minute.. the minute number
        second... the second number
        fix.... 1 if the time is fixed, 0 if it's variable ("the current time")
          A time that is not fixed (variable) will be updated as soon as the file is loaded.
          The value in the file is only the value that the var had when saving.
        correct... adjustement
-->
<!ELEMENT TIME
    EMPTY>
<!ATTLIST TIME
    hour   CDATA #REQUIRED
    minute CDATA #REQUIRED
    second CDATA #REQUIRED
    fix    CDATA #REQUIRED
    correct CDATA #IMPLIED>

<!--   Details for a page-related variable.
         subtype... Variable subtype:
              0... number of current page.
              1... total number of pages.
              2... title of the current section
         value... The variable value, number for subtype=0/1, string for subtype=2
-->
<!ELEMENT PGNUM
    EMPTY>
<!ATTLIST PGNUM
    subtype CDATA #REQUIRED
    value   CDATA #REQUIRED>

<!--   Details for a custom variable.
          name... The variable name
          value... The variable value
       Both name and value are entered by the user, they can be anything.
-->
<!ELEMENT CUSTOM
    EMPTY>
<!ATTLIST CUSTOM
    name   CDATA #REQUIRED
    value  CDATA #REQUIRED>

<!-- <MAILMERGE> exists as two versions:
     - a mail-merge variable
     - the global mail merge settings
     
     The mail-merge variable has the attribute "name" (#REQUIRED in that case) and no children (EMPTY)
     The global seetings has no attributes but has children (PLUGIN and DATASOURCE)
-->
<!ELEMENT MAILMERGE
    (PLUGIN, DATASOURCE)?>
<!ATTLIST MAILMERGE
    name   CDATA #IMPLIED>
    
<!--
  The plugin being used. library is the name of the lib, like "kwmailmerge_qtsqldb_power"
-->
<!ELEMENT PLUGIN
    EMPTY>
<!ATTLIST PLUGIN
   library CDATA #REQUIRED>
<!--
  The children of <DATASOURCE> depends on the plugin
-->
<!ELEMENT DATASOURCE
    ANY>
<!--
For the QtSQL-power-plugin, the contents of DATASOURCE is
 (DEFINITION,SAMPLERECORD)
 DEFINITION is (DATABASE,QUERY)
 DATABASE has port, driver, username, databasename, hostname attributes.
 QUERY has a value attribute (containing the SQL query)
 SAMPLERECORD is (FIELD*)
 FIELD has a name attribute.
-->

<!--    A "field" variable (property of the document)
        subtype... Field subtype:
                   0... Filename
                   1... Directory name
                   2... Author (as saved in documentinfo.xml)
                   3... Email (as saved in documentinfo.xml)
                   4... Company Name (as saved in documentinfo.xml)
                   5... Path filename
                   6... Filename without extension
                   7... Telephone
                   8... Fax
                   9... Country
                   10.. Document Title (as saved in documentinfo.xml)
                   11.. Document Abstract (as saved in documentinfo.xml)
                   12.. Postal Code
                   13.. City
                   14.. Street
                   15.. AuthorTitle
                   16.. Initials


        value... the value of the field (text)
-->
<!ELEMENT FIELD
    EMPTY>
<!ATTLIST FIELD
    subtype CDATA #REQUIRED
    value CDATA #REQUIRED>

<!--    A variable containing an hyperlink.
        linkName... The text that appears in the document.
        hrefName... The URL that this link points to.
-->
<!ELEMENT LINK
    EMPTY>
<!ATTLIST LINK
    linkName CDATA #REQUIRED
    hrefName CDATA #REQUIRED>

<!--    A comment embedded into the text.
        note... The text of the comment
-->
<!ELEMENT NOTE
    EMPTY>
<!ATTLIST NOTE
    note CDATA #REQUIRED>

<!--    A footnote variable.
        value...    The text of the variable (e.g. "1", "2")
        notetype... "footnote" or "endnote"
        numberingtype... "auto" or "manual"
        frameset... The name of the text frameset that contains the text
          associated with this footnote. The frameset must be defined,
          and must have frameInfo = 7.
-->
<!ELEMENT FOOTNOTE
    EMPTY>
<!ATTLIST FOOTNOTE
    value CDATA #REQUIRED
    notetype CDATA #REQUIRED
    numberingtype CDATA #REQUIRED
    frameset CDATA #REQUIRED>


<!--    A statistic variable.
        value...    A number (e.g. "1", "2")
        type...	    A type of statistic variable 
	            "0" Number of word
		    "1" Number of sentence
		    "2" Number of lines
		    "3" Number of characters
		    "4" Number of characters without space
		    "5" Number of syllable
		    "6" Number of frame
		    "7"	Number of embedded object
		    "8" Number of picture
		    "9" Number of table
-->
<!ELEMENT STATISTIC
    EMPTY>
<!ATTLIST STATISTIC
    value CDATA #REQUIRED
    type CDATA #REQUIRED>


<!--
        Picture collection. This list holds the keys of all the picture
        used by this document (by picture framesets), in the order in which
        they are stored in the store (under pictures/).
-->
<!ELEMENT PICTURES
    (KEY)*>

<!--
        Pixmap collection. This list holds the keys of all the pixmaps
        used by this document (by picture framesets), in the order in which
        they are stored in the store (under pictures/).
        Only for KWord 1.1 compatibility.
-->
<!ELEMENT PIXMAPS
    (KEY)*>

<!--
        Only for KWord 1.1 compatibility.
-->
<!ELEMENT CLIPARTS
    (KEY)*>

<!-- TODO: document! -->
<!ELEMENT SERIALL
    EMPTY>

<!ELEMENT SPELLCHECKIGNORELIST ( SPELLCHECKIGNOREWORD+ )>
<!ATTLIST SPELLCHECKIGNORELIST >
<!ELEMENT SPELLCHECKIGNOREWORD EMPTY>
<!ATTLIST SPELLCHECKIGNOREWORD word NMTOKEN #REQUIRED >

<!ELEMENT BOOKMARKS ( BOOKMARKITEM+ )>
<!ATTLIST BOOKMARKS >
<!ELEMENT BOOKMARKITEM EMPTY>
<!ATTLIST BOOKMARKITEM name NMTOKEN #REQUIRED 
                       cursorIndexStart NMTOKEN #REQUIRED
                       cursorIndexEnd NMTOKEN #REQUIRED
                       frameset NMTOKEN #REQUIRED
                       startparag NMTOKEN #REQUIRED
                       endparag NMTOKEN #REQUIRED>

<!--
        The key mapping to one picture
        
        name:     the relative path to the picture in the store (e.g. picture/picture1.ext)
                  (only if <KEY> is a child of <PICTURES>, otherwise the attribute name does not exist.)
        filename: the original path of the picture
        year...:  the date/time stamp
                  (suggestions:
                   - use UTC if you have the choice
                   - use the *NIX epoch (1970-01-01 00:00:00.000 UTC) if no date is available otherwise)
-->
<!ELEMENT KEY
    EMPTY>
<!ATTLIST KEY
    filename CDATA #REQUIRED
    year CDATA #REQUIRED
    month CDATA #REQUIRED
    day CDATA #REQUIRED
    hour CDATA #REQUIRED
    minute CDATA #REQUIRED
    second CDATA #REQUIRED
    msec CDATA #REQUIRED
    name CDATA #IMPLIED>

<!--
        Embedded object
-->
<!ELEMENT EMBEDDED
    (OBJECT,SETTINGS)>

<!--
        Standard part of the embedded object (part, url and position)
        mime    the mimetype, e.x. application/x-presenter
        url     the url, either external or internal (tar:/N for partN/maindoc.xml)
-->
<!ELEMENT OBJECT
    (RECT)>
<!ATTLIST OBJECT
    mime CDATA #REQUIRED
    url CDATA #REQUIRED>
<!--
        Position of the embedded object
-->
<!ELEMENT RECT
    EMPTY>
<!ATTLIST RECT
    x CDATA #REQUIRED
    y CDATA #REQUIRED
    w CDATA #REQUIRED
    h CDATA #REQUIRED>

<!--
        Additionnal attributes of the embedded object.
        In KWord's case, it's the definition of the frame around the object,
        and the name of the part-frameset.
        ### FIXME: the attribute list is the same as FRAMESET
-->
<!ELEMENT SETTINGS
    (FRAME)>
<!ATTLIST SETTINGS
    name CDATA #REQUIRED>