-
Notifications
You must be signed in to change notification settings - Fork 181
/
Copy pathssdoc-schema3.xsd
1209 lines (1208 loc) · 65.3 KB
/
ssdoc-schema3.xsd
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
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema targetNamespace="http://www.scansoft.com/omnipage/xml/ssdoc-schema3.xsd" elementFormDefault="qualified"
xmlns="http://www.scansoft.com/omnipage/xml/ssdoc-schema3.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- -->
<!-- -->
<!-- -->
<!-- -->
<!-- -->
<!-- -->
<!-- The common basic types: -->
<!-- -->
<!-- This describe any color. It can be 3 byte in hexadecimal what means the RGB values or it is the default background or default foreground-->
<!-- The background color of a node is the color around of letters in the node; the foreground color of the node is the color of the letter in the node. -->
<!-- When a node contains "backColor" or "foreColor" attribute these value is the background color or foreground color of it. -->
<!-- When a node doesn't contains "backColor" or "foreColor" attribute than the background color or foreground color of it is the same as the the background color or foreground color of it's parent node. -->
<!-- When a node doesn't contains "backColor" or "foreColor" attribute and there isn't parent of it, than background color of it is white and foreground color of it is black. -->
<xs:simpleType name="colorType">
<xs:restriction base="xs:string">
<xs:pattern value="[a-zA-Z0-9]{6}" /> <!-- Black: 000000 White: ffffff Red: 0000ff Green: 00ff00 Blue: ff0000 -->
<xs:pattern value="defaultBackground" /> <!-- The background of the parent object or white -->
<xs:pattern value="defaultForeground" /> <!-- The foreground color of the parent or black -->
</xs:restriction>
</xs:simpleType>
<!-- The distance between two point in twips -->
<xs:simpleType name="distanceType">
<xs:restriction base="xs:integer"></xs:restriction>
</xs:simpleType>
<!-- This type represents one character -->
<xs:simpleType name="characterType">
<xs:restriction base="xs:string">
<xs:length value="1" />
</xs:restriction>
</xs:simpleType>
<!-- Standard page sizes -->
<xs:simpleType name="pageSizeType">
<xs:restriction base="xs:string">
<xs:enumeration value="A0" />
<xs:enumeration value="A1" />
<xs:enumeration value="A2" />
<xs:enumeration value="A3" />
<xs:enumeration value="A4" />
<xs:enumeration value="A5" />
<xs:enumeration value="A6" />
<xs:enumeration value="A7" />
<xs:enumeration value="A8" />
<xs:enumeration value="B0" />
<xs:enumeration value="B1" />
<xs:enumeration value="B2" />
<xs:enumeration value="B3" />
<xs:enumeration value="B4" />
<xs:enumeration value="B5" />
<xs:enumeration value="B6" />
<xs:enumeration value="B7" />
<xs:enumeration value="B8" />
<xs:enumeration value="C0" />
<xs:enumeration value="C1" />
<xs:enumeration value="C2" />
<xs:enumeration value="C3" />
<xs:enumeration value="C4" />
<xs:enumeration value="C5" />
<xs:enumeration value="C6" />
<xs:enumeration value="C7" />
<xs:enumeration value="C8" />
<xs:enumeration value="B0 (JIS)" />
<xs:enumeration value="B1 (JIS)" />
<xs:enumeration value="B2 (JIS)" />
<xs:enumeration value="B3 (JIS)" />
<xs:enumeration value="B4 (JIS)" />
<xs:enumeration value="B5 (JIS)" />
<xs:enumeration value="B6 (JIS)" />
<xs:enumeration value="B7 (JIS)" />
<xs:enumeration value="B8 (JIS)" />
<xs:enumeration value="Letter" />
<xs:enumeration value="Letter Extra" />
<xs:enumeration value="9x11" />
<xs:enumeration value="10x11" />
<xs:enumeration value="10x14" />
<xs:enumeration value="11x17" />
<xs:enumeration value="12x11" />
<xs:enumeration value="15x11" />
<xs:enumeration value="A3 Extra" />
<xs:enumeration value="A4 Extra" />
<xs:enumeration value="A4 Plus" />
<xs:enumeration value="A5 Extra" />
<xs:enumeration value="B5 (ISO) Extra" />
<xs:enumeration value="C size sheet" />
<xs:enumeration value="D size sheet" />
<xs:enumeration value="E size sheet" />
<xs:enumeration value="Envelope #9" />
<xs:enumeration value="Envelope #10" />
<xs:enumeration value="Envelope #11" />
<xs:enumeration value="Envelope #12" />
<xs:enumeration value="Envelope #14" />
<xs:enumeration value="Envelope B4" />
<xs:enumeration value="Envelope B5" />
<xs:enumeration value="Envelope B6" />
<xs:enumeration value="Envelope C3" />
<xs:enumeration value="Envelope C4" />
<xs:enumeration value="Envelope C5" />
<xs:enumeration value="Envelope C6" />
<xs:enumeration value="Envelope C65" />
<xs:enumeration value="Envelope DL" />
<xs:enumeration value="Envelope Invite" />
<xs:enumeration value="Envelope Monarch" />
<xs:enumeration value="Envelope Personal" />
<xs:enumeration value="Executive" />
<xs:enumeration value="Folio" />
<xs:enumeration value="German Std Fanfold" />
<xs:enumeration value="German Legal Fanfold" />
<xs:enumeration value="Japanese Postcard" />
<xs:enumeration value="Japanese Double Postcard" />
<xs:enumeration value="Japanese Envelope Kaku #2" />
<xs:enumeration value="Japanese Envelope Kaku #3" />
<xs:enumeration value="Japanese Envelope Chou #3" />
<xs:enumeration value="Japanese Envelope Chou #4" />
<xs:enumeration value="Japanese Envelope You #4" />
<xs:enumeration value="Japanese Envelope You #4 Rotated" />
<xs:enumeration value="Ledger" />
<xs:enumeration value="Legal" />
<xs:enumeration value="Legal Extra" />
<xs:enumeration value="Letter Plus" />
<xs:enumeration value="Note" />
<xs:enumeration value="PRC 16K" />
<xs:enumeration value="PRC 32K" />
<xs:enumeration value="PRC Envelope #1" />
<xs:enumeration value="PRC Envelope #2" />
<xs:enumeration value="PRC Envelope #3" />
<xs:enumeration value="PRC Envelope #4" />
<xs:enumeration value="PRC Envelope #5" />
<xs:enumeration value="PRC Envelope #6" />
<xs:enumeration value="PRC Envelope #7" />
<xs:enumeration value="PRC Envelope #8" />
<xs:enumeration value="PRC Envelope #9" />
<xs:enumeration value="PRC Envelope #10" />
<xs:enumeration value="PRC 16K Rotated" />
<xs:enumeration value="PRC 32K Rotated" />
<xs:enumeration value="Quarto" />
<xs:enumeration value="Statement" />
<xs:enumeration value="SuperA" />
<xs:enumeration value="SuperB" />
<xs:enumeration value="Tabloid" />
<xs:enumeration value="Tabloid" />
<xs:enumeration value="US Std Fanfold" />
<xs:enumeration value="Custom" />
</xs:restriction>
</xs:simpleType>
<!-- "anchorToType" describe that the object have to move with the anchor object (toPara) or not (toPage) -->
<!-- <dd> and <rulerLine> can be anchored to <para> <picture> and <table> the position may be relative to paragraph, picture, table or may be relative to page.-->
<xs:simpleType name="anchorToType">
<xs:restriction base="xs:string">
<xs:enumeration value="toPage" /> <!-- It means that the object (<dd> or <rulerLine>) doesn't move with the anchorTo object (<para>, <picture>, <table>) -->
<xs:enumeration value="toPara" /> <!-- It means that the object (<dd> or <rulerLine>) have to move with the anchorTo object (<para>, <picture>, <table>) -->
</xs:restriction>
</xs:simpleType>
<!-- The style of line. This line can be Ruler, table grid or piece of border-->
<!-- line as something straight and narrow and NOT as a line of text -->
<xs:simpleType name="lineStyle">
<xs:restriction base="xs:string">
<xs:enumeration value="none" /> <!-- The line isn't visible -->
<xs:enumeration value="single" /> <!-- The line is a single continous line -->
<xs:enumeration value="dotted" /> <!-- The line consist of many dot -->
<xs:enumeration value="thick" /> <!-- A thick continous line -->
<xs:enumeration value="dash" /> <!-- The line consist of many dash -->
<xs:enumeration value="double" /> <!-- Two single continous line -->
</xs:restriction>
</xs:simpleType>
<!-- Orientation of the original image of the page. You need to use it when you want to connect the position to the image -->
<xs:simpleType name="orientationType">
<xs:restriction base="xs:string">
<xs:enumeration value="0" /> <!-- Original image wasn't rotated -->
<xs:enumeration value="90" />
<xs:enumeration value="180" />
<xs:enumeration value="270" />
</xs:restriction>
</xs:simpleType>
<!-- The paragraph, picture, table and cell have alignment attribute -->
<xs:simpleType name="alignmentType">
<xs:restriction base="xs:string">
<xs:enumeration value="left" /><!-- Left alignment: the position of the lefts side of lines are the same -->
<xs:enumeration value="right" /> <!-- Right alignment: the position of the right side of lines are the same -->
<xs:enumeration value="centered" /> <!-- Centered alignment: the position of the middle of lines are the same -->
<xs:enumeration value="justified" /> <!-- Don't used in case of tab -->
<xs:enumeration value="decimal" /> <!-- It can be use only in case of cell -->
</xs:restriction>
</xs:simpleType>
<!-- The vertical alignment of cell -->
<xs:simpleType name="verticalAlignmentType">
<xs:restriction base="xs:string">
<xs:enumeration value="top" />
<xs:enumeration value="middle" />
<xs:enumeration value="bottom" />
</xs:restriction>
</xs:simpleType>
<!-- We can handle to different bullet type. The ordered contains numbers or alphabet. The bulleted contains a bullet character. -->
<xs:simpleType name="bulletTypeType">
<xs:restriction base="xs:string">
<xs:enumeration value="ordered" /> <!-- Each line start a number -->
<xs:enumeration value="bulleted" /> <!-- Each line start a special marker as square, triangular, dash, diamond, circle, ... -->
</xs:restriction>
</xs:simpleType>
<!-- This describe the bullet character in case of bulleted bulletType -->
<xs:simpleType name="bulletValueType">
<xs:restriction base="xs:string">
<xs:enumeration value="smallCircle" />
<xs:enumeration value="whiteCircle" />
<xs:enumeration value="smallSquare" />
<xs:enumeration value="whiteSquare" />
<xs:enumeration value="squareRoot" />
<xs:enumeration value="triangular" />
<xs:enumeration value="dash" />
<xs:enumeration value="diamond" />
</xs:restriction>
</xs:simpleType>
<!-- The line spacing can be single, double, one and half, exactly or atLeast -->
<!-- In case of exactly and atLeast we have to specify the value too -->
<xs:simpleType name="lspValueType">
<xs:restriction base="xs:string">
<xs:enumeration value="single" />
<xs:enumeration value="oneAndHalf" />
<xs:enumeration value="double" />
<xs:enumeration value="exactly" />
<xs:enumeration value="atLeast" />
</xs:restriction>
</xs:simpleType>
<!-- The name of font. e.g. "Arial", "Times New Roman", "Garamond", ... -->
<xs:simpleType name="fontFaceType">
<xs:restriction base="xs:string"></xs:restriction>
</xs:simpleType>
<!-- languages now only include the ones we can spell -->
<xs:simpleType name="languageType">
<xs:restriction base="xs:language"></xs:restriction>
</xs:simpleType>
<!-- The direction of writing -->
<xs:simpleType name="textDirectionType">
<xs:restriction base="xs:string">
<xs:enumeration value="left2right" /> <!-- e.g. The latin writing mode -->
<xs:enumeration value="top2down" />
<xs:enumeration value="down2top" />
<xs:enumeration value="top2downNeon" />
<xs:enumeration value="right2left" />
</xs:restriction>
</xs:simpleType>
<!-- Specifies whether text is underlined and the underline style. The none means no underlining. -->
<xs:simpleType name="underlinedType">
<xs:restriction base="xs:string">
<xs:enumeration value="none" />
<xs:enumeration value="single" />
<xs:enumeration value="double" />
</xs:restriction>
</xs:simpleType>
<!-- Superscript raises the text above the baseline and changes the text to a smaller font size.
Subscript lowers the text below the baseline and changes the text to a smaller font size.
none means the normal baseline and normal font size. -->
<xs:simpleType name="subsuperscriptType">
<xs:restriction base="xs:string">
<xs:enumeration value="none" />
<xs:enumeration value="subscript" />
<xs:enumeration value="superscript" />
</xs:restriction>
</xs:simpleType>
<!-- This describe the family of the font. You need it if you want to substitute the font. -->
<xs:simpleType name="fontFamilyType">
<xs:restriction base="xs:string">
<xs:enumeration value="roman" />
<xs:enumeration value="swiss" />
<xs:enumeration value="modern" />
<xs:enumeration value="script" />
<xs:enumeration value="decorative" />
</xs:restriction>
</xs:simpleType>
<!-- This describe the font. You need it if you want to substitute the font. -->
<xs:simpleType name="fontPitchType">
<xs:restriction base="xs:string">
<xs:enumeration value="fixed" /> <!-- The widths of all character are the same -->
<xs:enumeration value="variable" /> <!-- The widhts of characters differ -->
</xs:restriction>
</xs:simpleType>
<!-- We can handle two different field code. The pageNumber and the numberOfPages. -->
<xs:simpleType name="fieldCodeTypeType">
<xs:restriction base="xs:string">
<xs:enumeration value="pageNumber" /> <!-- This is the number of the actual page -->
<xs:enumeration value="numberOfPages" /> <!-- This is the number of all pages -->
</xs:restriction>
</xs:simpleType>
<!-- This identify a corner of a rectangle -->
<xs:simpleType name="cornerId">
<xs:restriction base="xs:string">
<xs:enumeration value="none" />
<xs:enumeration value="topLeft" />
<xs:enumeration value="topRight" />
<xs:enumeration value="bottomLeft" />
<xs:enumeration value="bottomRight" />
</xs:restriction>
</xs:simpleType>
<!-- The pattern of the background -->
<xs:simpleType name="patternType">
<xs:restriction base="xs:string">
<xs:enumeration value="none" />
<xs:enumeration value="vertical" />
<xs:enumeration value="horizontal" />
<xs:enumeration value="fdiagonal" />
<xs:enumeration value="bdiagonal" />
<xs:enumeration value="cross" />
<xs:enumeration value="diagcross" />
<xs:enumeration value="5" />
<xs:enumeration value="10" />
<xs:enumeration value="20" />
<xs:enumeration value="25" />
<xs:enumeration value="30" />
<xs:enumeration value="40" />
<xs:enumeration value="50" />
<xs:enumeration value="60" />
<xs:enumeration value="70" />
<xs:enumeration value="75" />
<xs:enumeration value="80" />
<xs:enumeration value="90" />
<xs:enumeration value="gradhorizontal" />
<xs:enumeration value="gradvertical" />
</xs:restriction>
</xs:simpleType>
<!-- We can mark two different complex input form field. -->
<xs:simpleType name="formGroupTypeType">
<xs:restriction base="xs:string">
<xs:enumeration value="none" />
<xs:enumeration value="comb" /> <!-- This is a comb, more small rectangle and the user can put only one character to each rectangle. -->
<xs:enumeration value="multiLine" /> <!-- More line together -->
</xs:restriction>
</xs:simpleType>
<!-- This describe that an object is a continuation of the previos object, that this object continue on the next object or both. -->
<xs:simpleType name="continuityType">
<xs:restriction base="xs:string">
<xs:enumeration value="contToNext" />
<xs:enumeration value="contFromPrev" />
<xs:enumeration value="contFromPrevToNext" />
</xs:restriction>
</xs:simpleType>
<!-- The filling method of the zone see KernelApi.h FILLINGMETHOD -->
<xs:simpleType name="fillingMethodType">
<xs:restriction base="xs:string">
<xs:enumeration value="default" />
<xs:enumeration value="omnifont" />
<xs:enumeration value="draftdot9" />
<xs:enumeration value="barcode" />
<xs:enumeration value="omr" />
<xs:enumeration value="handprint" />
<xs:enumeration value="braille" />
<xs:enumeration value="draftdot24" />
<xs:enumeration value="ocrA" />
<xs:enumeration value="ocrB" />
<xs:enumeration value="micr" />
<xs:enumeration value="barcode2d" />
<xs:enumeration value="dotdigit" />
<xs:enumeration value="dashdigit" />
<xs:enumeration value="asian" />
<xs:enumeration value="reserved1" />
<xs:enumeration value="noOcr" />
</xs:restriction>
</xs:simpleType>
<!-- The Recognition modules of the zone see KernelApi.h RECOGNITIONMODULE -->
<xs:simpleType name="recognitionModuleType">
<xs:restriction base="xs:string">
<xs:enumeration value="auto" />
<xs:enumeration value="omnifontMtx" />
<xs:enumeration value="omnifontMor" />
<xs:enumeration value="dot" />
<xs:enumeration value="bar" />
<xs:enumeration value="omr" />
<xs:enumeration value="hnr" />
<xs:enumeration value="rer" />
<xs:enumeration value="bra" />
<xs:enumeration value="mat" />
<xs:enumeration value="barAmp" />
<xs:enumeration value="omnifontPlus2w" />
<xs:enumeration value="omnifontFrx" />
<xs:enumeration value="omnifontPlus3w" />
<xs:enumeration value="asian" />
<xs:enumeration value="reservedM" />
</xs:restriction>
</xs:simpleType>
<!-- -->
<!-- The common attribute groups: -->
<!-- -->
<!-- The appearance of a line. It can be a pieace of border, a grid of table or a ruler -->
<xs:attributeGroup name="lineDesc">
<xs:attribute name="type" type="lineStyle" default="none" />
<xs:attribute name="width" type="distanceType" default="1" /> <!-- The width of the line in twips -->
<xs:attribute name="color" type="colorType" default="defaultForeground" /> <!-- The color of the line -->
</xs:attributeGroup>
<!-- rectangle description -->
<xs:attributeGroup name="rcDesc">
<xs:attribute name="l" type="distanceType" use="required" /> <!-- Left of rectangle in twis. This is a distance between left side of rectangle and the left edge of the page -->
<xs:attribute name="t" type="distanceType" use="required" /> <!-- Right of rectangle in twis. This is a distance between top side of rectangle and the top edge of the page -->
<xs:attribute name="r" type="distanceType" use="required" /> <!-- Right of rectangle in twis. This is a distance between right side of rectangle and the left edge of the page -->
<xs:attribute name="b" type="distanceType" use="required" /> <!-- Bottom of rectangle in twis. This is a distance between bottom side of rectangle and the left top of the page -->
</xs:attributeGroup>
<!-- The four distance to the four direction what means the distance the object and the text around it -->
<xs:attributeGroup name="distanceFromTextDesc">
<xs:attribute name="leftDistance" type="distanceType" use="optional" /> <!-- Distance between the left side of the object and the text near it in twips -->
<xs:attribute name="topDistance" type="distanceType" use="optional" /> <!-- Distance between the top side of the object and the text near it in twips -->
<xs:attribute name="rightDistance" type="distanceType" use="optional" /> <!-- Distance between the right side of the object and the text near it in twips -->
<xs:attribute name="bottomDistance" type="distanceType" use="optional" /> <!-- Distance between the bottom side of the object and the text near it in twips -->
</xs:attributeGroup>
<!-- The four distance between the cell border and the text inside the cell in twips -->
<xs:attributeGroup name="innerMarginDesc">
<xs:attribute name="marginLeft" type="distanceType" use="optional" />
<xs:attribute name="marginTop" type="distanceType" use="optional" />
<xs:attribute name="marginRight" type="distanceType" use="optional" />
<xs:attribute name="marginBottom" type="distanceType" use="optional" />
</xs:attributeGroup>
<!-- common attributes of the paragraph like object as pic, table and paragraph -->
<xs:attributeGroup name="paralikeDesc">
<xs:attribute name="backColor" type="colorType" /> <!-- The background color of the paragraph, table.-->
<xs:attribute name="alignment" type="alignmentType" /> <!-- alignment of the paragraph, picture or table -->
<xs:attribute name="li" type="distanceType" /> <!-- Left indent of the paragraph, picture or table in twips. This is a distance between left side of paragraph, picture or table and the left edge of the container (column, cell, dd, frame) -->
<xs:attribute name="ri" type="distanceType" /> <!-- Right indent of the paragraph, picture or table in twips. This is a distance between right side of paragraph, picture or table and the right edge of the container (column, cell, dd, frame) -->
<xs:attribute name="spaceBefore" type="distanceType" /> <!-- Space before of the paragraph, picture or table in twips. This is a distance between top side of paragraph, picture or table and the top edge of the containter or the bottom of the previous paragraph in the container -->
<xs:attribute name="spaceAfter" type="distanceType" /> <!-- Space after of the paragraph, picture or table in twips. This is a distance between bottom side of paragraph, picture or table and the bottom edge of the containter or the top of the previous paragraph in the container -->
</xs:attributeGroup>
<!-- paragraph description -->
<xs:attributeGroup name="paraDesc">
<xs:attributeGroup ref="paralikeDesc" />
<xs:attribute name="fli" type="distanceType" /> <!-- First line indent in twips. -->
<xs:attribute name="lsp" type="lspValueType" /> <!-- The category of the line spacing. -->
<xs:attribute name="lspExact" type="distanceType" /> <!-- The exact value of the line spacing in twips. This is a distance between baselines of two sequential text line -->
<xs:attribute name="language" type="languageType" default="en" /> <!-- The main language of the text in the paragraph -->
<xs:attributeGroup ref="fontDesc" />
</xs:attributeGroup>
<!-- font description -->
<xs:attributeGroup name="fontDesc">
<xs:attribute name="bold" type="xs:boolean" default="false" />
<xs:attribute name="italic" type="xs:boolean" default="false" />
<xs:attribute name="underlined" type="underlinedType" />
<xs:attribute name="strikethrough" type="xs:boolean" default="false" />
<xs:attribute name="subsuperscript" type="subsuperscriptType" />
<xs:attribute name="fontSize" type="xs:unsignedInt" default="10" /> <!-- The size of the font. 1000 means 10 point -->
<xs:attribute name="fontFace" type="fontFaceType" />
<xs:attribute name="fontFamily" type="fontFamilyType" />
<xs:attribute name="fontPitch" type="fontPitchType" />
<xs:attribute name="spacing" type="distanceType" /> <!-- Character spacing in twips. Extra distance between characts. It may be negative. -->
<xs:attribute name="scale" type="xs:int" /> <!-- Scale of the text. 1000 maens 100% The factor of the with and height. -->
<xs:attribute name="foreColor" type="colorType" /> <!-- Color of the text -->
</xs:attributeGroup>
<!-- This describe that a non flowing object position fix or relative to a paragraph. -->
<xs:attributeGroup name="anchorDesc">
<xs:attribute name="anchorTo" type="anchorToType" />
<xs:attribute name="refTo" type="xs:IDREF" /> <!-- This have to equal para/@id or table/@id or pic/@id -->
</xs:attributeGroup>
<!-- Describe the shadow of the object -->
<xs:attributeGroup name="shadowDesc">
<xs:attribute name="shadowWidth" type="distanceType" />
<xs:attribute name="shadowWhere" type="cornerId" />
</xs:attributeGroup>
<!-- Describe the Background pattern -->
<xs:attributeGroup name="patternDesc">
<xs:attribute name="patternType" type="patternType" />
<xs:attribute name="patternColor" type="cornerId" />
</xs:attributeGroup>
<!-- Describe the border corner -->
<xs:attributeGroup name="roundCornerDesc">
<xs:attribute name="topLeftCornerRadius" type="distanceType" default="0" /> <!-- The radius of the top left corner in twips. It must be non negative. 0 means no rounded corner -->
<xs:attribute name="topRightCornerRadius" type="distanceType" default="0" /> <!-- The radius of the top right corner in twips. It must be non negative. 0 means no rounded corner -->
<xs:attribute name="bottomLeftCornerRadius" type="distanceType" default="0" /> <!-- The radius of the bottom left corner in twips. It must be non negative. 0 means no rounded corner -->
<xs:attribute name="bottomRightCornerRadius" type="distanceType" default="0" /> <!-- The radius of the bottom right corner in twips. It must be non negative. 0 means no rounded corner -->
</xs:attributeGroup>
<!-- Describe the appearance of the object. Background and border -->
<xs:attributeGroup name="backgroundAppearanceDesc">
<xs:attributeGroup ref="shadowDesc" />
<xs:attributeGroup ref="patternDesc" />
<xs:attributeGroup ref="roundCornerDesc" />
<xs:attribute name="backColor" type="colorType" /> <!-- Background color of object -->
</xs:attributeGroup>
<!-- Describe the input form field. It contains the name of field. This need for database connection.
and describe the tab order. -->
<xs:attributeGroup name="inputFormFieldDesc">
<xs:attribute name="inputDataName" type="xs:string" />
<xs:attribute name="formId" type="xs:ID" />
<xs:attribute name="nextTab" type="xs:IDREF" />
<xs:attribute name="prevTab" type="xs:IDREF" />
</xs:attributeGroup>
<!-- zone description -->
<xs:attributeGroup name="zoneDesc">
<xs:attribute name="language" type="languageType" default="en" />
<xs:attribute name="textDirection" type="textDirectionType" default="left2right" />
<xs:attribute name="userData" type="xs:long" />
<xs:attribute name="fillingMethod" type="fillingMethodType" />
<xs:attribute name="recognitionModule" type="recognitionModuleType" />
<xs:attribute name="chrFilter" type="xs:string" /> <!-- Combination of the chr filter. E.g. "digit | uppercase" See KernelApi.h CHR_FILTER -->
<xs:attribute name="userZoneId" type="xs:int" />
<xs:attribute name="fieldName" type="xs:string" />
</xs:attributeGroup>
<!-- Describe the border of object -->
<xs:group name="borderGroup">
<xs:sequence>
<xs:element name="leftBorder" type="lineType" minOccurs="0" />
<xs:element name="topBorder" type="lineType" minOccurs="0" />
<xs:element name="rightBorder" type="lineType" minOccurs="0" />
<xs:element name="bottomBorder" type="lineType" minOccurs="0" />
</xs:sequence>
</xs:group>
<!-- The nodes for describe the attributes of paragraph. Tab positons bullets and dropcap -->
<xs:group name="paraAttribGroup">
<xs:sequence>
<xs:group ref="borderGroup" /> <!-- Border of the paragraph -->
<xs:element name="dropCap" type="dropCapType" minOccurs="0" maxOccurs="1" />
<xs:element name="bullet" type="bulletType" minOccurs="0" maxOccurs="1" />
<xs:element name="tabs" type="tabType" minOccurs="0" maxOccurs="unbounded" /> <!-- One <tabs> node for each tab pozition -->
</xs:sequence>
</xs:group>
<!-- -->
<!-- Complex Types -->
<!-- -->
<!-- This type can describe the attributes of a single line. It can be a piece of border or a ruleLine -->
<xs:complexType name="lineType">
<xs:attributeGroup ref="lineDesc" />
</xs:complexType>
<!-- rectangle the positions are in twips -->
<xs:complexType name="rcType">
<xs:attributeGroup ref="rcDesc" />
</xs:complexType>
<!-- The shape of the irregular object. The position are in twips. -->
<!-- It describe a pizzabox. It means there are any rectangle each bottom of rectangle
have to equal with the top of the next rectangle and each rectangle
have to overlap the next rectangle horizontaly -->
<xs:complexType name="shapeType">
<xs:sequence>
<xs:element name="rect" type="rcType" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<!-- This describe the dorpCap properth of a paragraph.
It doesn't contains any text but say the number of character in the dropCap,
the size of dropCap in line and where is the DropCap. -->
<xs:complexType name="dropCapType">
<xs:attribute name="type">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="inMargin" /> <!-- The DropCap is out of text -->
<xs:enumeration value="dropped" /> <!-- The DropCap drop out texts -->
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="numChars" type="xs:int" default="1" /> <!-- Number of characters in DropCap -->
<xs:attribute name="numLines" type="xs:int" /> <!-- Size of DropCap in lines. The size of DropCap equal with height of numLines lines -->
</xs:complexType>
<!-- This describe the bullet and numbering properties of a paragraph.
It doesn'n contain any text but contains the number of character in the bullet. -->
<xs:complexType name="bulletType" mixed="true">
<xs:attribute name="type" type="bulletTypeType" /> <!-- "bulleted" or "ordered" bullet -->
<xs:attribute name="value" type="bulletValueType" /> <!-- It describe the bullet symbol it it is a "bulleted" bulet -->
<xs:attribute name="numChars" type="xs:positiveInteger" /> <!-- Number of character in bullet -->
</xs:complexType>
<!-- This describe a tab appearance. It contains position alignement and leaderChar -->
<!-- A paragraph contains some tab pozition (Described by "tabType".) and some tab character. This type specifies the position of the character after the tab character -->
<xs:complexType name="tabType">
<xs:attribute name="alignment" type="alignmentType" />
<xs:attribute name="position" type="distanceType" />
<xs:attribute name="leaderChar" type="characterType" /> <!-- The filling character between the caracter before tab character and character after tab character -->
</xs:complexType>
<!-- This describe the layout of a table -->
<!-- A table consist of a gridTable and cells.
The gridTable describe the number of row, the number of column and the sizes of these.
A cell can cover more than one row and/or column
The vertical position of the first column grid equal with the left side of the container (column, dd, frame) plus the left indent of the table.
The vertical position of the next column grid equal with the first column grid position plus the first value in the <gridCol>
The horizontal positon of the first row grid equal with the top side of the container plus the space before of the table.
The horizontal position of the next row grid equal with the first row grid position plus the first value in the <gridRow>-->
<xs:complexType name="gridTableType">
<xs:sequence>
<xs:element name="gridCol" type="xs:int" minOccurs="1" maxOccurs="unbounded" /> <!-- The widths of columns in twips. Each value is a distance between two grid. -->
<xs:element name="gridRow" type="xs:int" minOccurs="1" maxOccurs="unbounded" /> <!-- The widths of rows in twips. Each value is a distance between two grid. -->
</xs:sequence>
</xs:complexType>
<!-- -->
<!-- -->
<!-- Here are the page description objects: -->
<!-- -->
<!-- <source> describe the image what was recognized.
These need for the connection between the position of the object and the original image. -->
<xs:complexType name="sourceType">
<xs:attribute name="file" type="xs:string" /> <!-- The path of the original image -->
<xs:attribute name="dpix" type="xs:int" /> <!-- The horizontal dpi of the original image -->
<xs:attribute name="dpiy" type="xs:int" /> <!-- The vertical dpi of the original image -->
<xs:attribute name="sizex" type="distanceType" /> <!-- The original width of the image in twips -->
<xs:attribute name="sizey" type="distanceType" /> <!-- The original height of the image in twips-->
<xs:attribute name="orientation" type="orientationType" default="0" /> <!-- The rotation of the original imaga. -->
<xs:attribute name="skew" type="xs:int" default="0" /> <!-- The slant of the original image. -->
</xs:complexType>
<!-- <theoreticalPage> describes the ideal page. -->
<!-- With the offsets you can write the -->
<!-- difference between the real and the -->
<!-- theoratical one. -->
<xs:complexType name="theoreticalPageType">
<xs:attribute name="size" type="pageSizeType" use="required" /> <!-- The name of the page size -->
<xs:attribute name="marginLeft" type="distanceType" use="required" /> <!-- The left margin in twips. The distance between flow text end the left edge of page -->
<xs:attribute name="marginTop" type="distanceType" use="required" /> <!-- The top margin in twips. The distance between flow text end the top edge of page -->
<xs:attribute name="marginRight" type="distanceType" use="required" /> <!-- The right margin in twips. The distance between flow text end the right edge of page -->
<xs:attribute name="marginBottom" type="distanceType" use="required" /> <!-- The bottom margin in twips. The distance between flow text end the bottom edge of page -->
<xs:attribute name="offsetX" type="distanceType" use="optional" /> <!-- The horizontal displacement in twips to get the ideal place of the body on the page -->
<xs:attribute name="offsetY" type="distanceType" use="optional" /> <!-- The vertical displacement in twips to get the ideal place of the body on the page -->
<xs:attribute name="width" type="distanceType" use="optional" /> <!-- Width of the ideal page in twips -->
<xs:attribute name="height" type="distanceType" use="optional" /> <!-- Height of the ideal page in twips -->
</xs:complexType>
<!-- <summary> contains some informational data. Title, author, ... -->
<xs:complexType name="summaryType">
<xs:sequence>
<xs:element name="comment" type="xs:string" minOccurs="0" maxOccurs="1" />
</xs:sequence>
<xs:attribute name="title" type="xs:string" use="optional" />
<xs:attribute name="subject" type="xs:string" use="optional" />
<xs:attribute name="author" type="xs:string" use="optional" />
<xs:attribute name="company" type="xs:string" use="optional" />
</xs:complexType>
<!-- <description> describes the page attribute and the original image of page -->
<xs:complexType name="pageDescType">
<xs:sequence>
<xs:element name="source" type="sourceType" />
<xs:element name="theoreticalPage" type="theoreticalPageType" minOccurs="0" />
<xs:element name="language" type="languageType" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="backColor" type="colorType" default="defaultForeground" /> <!-- The background color of the page -->
<xs:attribute name="textDirection" type="textDirectionType" default="left2right" /> <!-- The main directions of text lines on the page -->
</xs:complexType>
<!-- <styleTable> contains styles what can contain paragraph and font attributes -->
<xs:complexType name="styleTableType">
<xs:sequence>
<xs:element name="style" type="styleType" minOccurs="1" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<!-- This describe a style. It contains paragaph and font attributes -->
<xs:complexType name="styleType">
<xs:group ref="paraAttribGroup" />
<xs:attribute name="styleID" type="xs:ID" use="required" /> <!-- This is a unique identifier for the style. It is used by the paragraph or other to refer a style -->
<xs:attributeGroup ref="paraDesc" />
</xs:complexType>
<!-- -->
<!-- -->
<!-- Here is the main tree of the objects: -->
<!-- -->
<!-- <rulerline> is a line with attribute and anchor -->
<xs:complexType name="rulerType">
<xs:attributeGroup ref="rcDesc" /> <!-- Bounding Rectangle of the line -->
<xs:attributeGroup ref="lineDesc" /> <!-- The appearance of the line -->
<xs:attributeGroup ref="anchorDesc" /> <!-- It specifies connecting object (<para>, <picture>, <table>)-->
</xs:complexType>
<!-- <ch> charactertype -->
<!-- mixed as it contains char data -->
<!-- rcDesc is mandatory, but is ignored within <alt> as the chars inside -->
<!-- inherit their (common) boundingbox info from <alt>. -->
<!-- NOTE: a charType _can_ contain more than one letter. it should be thought of -->
<!-- as a unit with a bounding box -->
<!-- The xml doesn't contains <ch> always. You have to switch to write it. -->
<xs:complexType name="charType" mixed="true">
<xs:attribute name="optionalHyphen" type="xs:boolean" default="0" />
<xs:attribute name="conf" type="xs:int" default="0" /> <!-- The confidence of the character, see kernelApi.h LETTER::err field -->
<xs:attributeGroup ref="rcDesc" />
</xs:complexType>
<!-- <alt> a sequence of alternative characters -->
<!-- The xml doesn't contains <alt> always, it appears when the <ch> visible. You have to switch to write it. -->
<!-- It connected to the previous <ch> -->
<xs:complexType name="altType">
<xs:sequence>
<xs:element name="ch" type="charType" minOccurs="1" maxOccurs="unbounded" />
</xs:sequence>
<xs:attributeGroup ref="rcDesc" />
</xs:complexType>
<!-- <nl> can be mark the new line. We don't use it after ln. -->
<xs:complexType name="nlType">
<xs:attribute name="orig" type="xs:boolean" default="true" /> <!-- This is an original end of line (end of line in the image). Not inserted by the editor. -->
<xs:attribute name="force" type="xs:boolean" default="true" /> <!-- The next character have to be in the next line. -->
</xs:complexType>
<!-- We put <tab> in place of tabulator -->
<xs:complexType name="tabPositionType">
<xs:attribute name="position" type="distanceType" /> <!-- The original position of this tabulator -->
<xs:attribute name="leader" type="xs:int" /> <!-- The filling character -->
</xs:complexType>
<!-- We put <space> in place of space. We use it usually between <wd> -->
<xs:complexType name="spaceType">
<xs:attribute name="width" type="distanceType" />
</xs:complexType>
<!-- <run> a sequence of characters sharing font, formatting, language or other(?) attributes -->
<!-- The text inside it have the same formatting attribute. -->
<xs:complexType name="runType" mixed="true">
<xs:sequence>
<xs:group ref="borderGroup" />
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="ch" type="charType" />
<xs:element name="alt" type="altType" />
<xs:element name="run" type="runType" />
<xs:element name="wd" type="wordType" />
<xs:element name="nl" type="nlType" />
<xs:element name="tab" type="tabPositionType" /> <!-- It represents tabulator in the text -->
<xs:element name="space" type="spaceType" /> <!-- It represents the space between words. -->
<xs:element name="link" type="linkType" />
<xs:element name="fieldCode" type="fieldCodeType" />
<xs:element name="formGroup" type="formGroupType" />
<xs:element name="inputLine" type="inputLineType" />
<xs:element name="checkBox" type="checkBoxType" />
<xs:element name="circleText" type="circleTextType" />
<xs:element name="fillGraphics" type="fillGraphicsType" />
</xs:choice>
</xs:sequence>
<xs:attributeGroup ref="fontDesc" />
<xs:attribute name="language" type="languageType" default="en" />
<xs:attributeGroup ref="backgroundAppearanceDesc" />
</xs:complexType>
<!-- <word> could mark the words. We mark all word or don't mark any word in a page . -->
<xs:complexType name="wordType" mixed="true">
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="ch" type="charType" />
<xs:element name="alt" type="altType" />
<xs:element name="run" type="runType" />
<xs:element name="link" type="linkType" />
<xs:element name="fieldCode" type="fieldCodeType" />
<xs:element name="formGroup" type="formGroupType" />
<xs:element name="inputLine" type="inputLineType" />
<xs:element name="checkBox" type="checkBoxType" />
<xs:element name="circleText" type="circleTextType" />
<xs:element name="nl" type="nlType" />
<xs:element name="tab" type="tabPositionType" />
<xs:element name="space" type="spaceType" />
</xs:choice>
</xs:sequence>
<xs:attributeGroup ref="rcDesc" />
<xs:attributeGroup ref="fontDesc" />
<xs:attribute name="continuityType" />
</xs:complexType>
<!-- <link> mark the links. It represents an URL -->
<xs:complexType name="linkType" mixed="true">
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="ch" type="charType" />
<xs:element name="alt" type="altType" />
<xs:element name="run" type="runType" />
<xs:element name="wd" type="wordType" />
<xs:element name="nl" type="nlType" />
<xs:element name="tab" type="tabPositionType" />
<xs:element name="space" type="spaceType" />
</xs:choice>
</xs:sequence>
<xs:attribute name="href" type="xs:anyURI" use="required" />
</xs:complexType>
<!-- <fieldCode> mark the fieldCode. We can handle two different field code only. (pageNumber, numberOfPages)-->
<xs:complexType name="fieldCodeType" mixed="true">
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="ch" type="charType" />
<xs:element name="alt" type="altType" />
<xs:element name="run" type="runType" />
<xs:element name="wd" type="wordType" />
<xs:element name="nl" type="nlType" />
<xs:element name="tab" type="tabPositionType" />
<xs:element name="space" type="spaceType" />
</xs:choice>
</xs:sequence>
<xs:attribute name="type" type="fieldCodeTypeType" use="required" />
</xs:complexType>
<!-- <formGroup> mark the complex input form field. -->
<xs:complexType name="formGroupType" mixed="true">
<xs:sequence>
<xs:group ref="borderGroup" />
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="ch" type="charType" />
<xs:element name="alt" type="altType" />
<xs:element name="run" type="runType" />
<xs:element name="wd" type="wordType" />
<xs:element name="nl" type="nlType" />
<xs:element name="tab" type="tabPositionType" />
<xs:element name="space" type="spaceType" />
<xs:element name="ln" type="lnType" />
<xs:element name="formGroup" type="formGroupType" />
<xs:element name="inputLine" type="inputLineType" />
<xs:element name="checkBox" type="checkBoxType" />
<xs:element name="circleText" type="circleTextType" />
<xs:element name="fillGraphics" type="fillGraphicsType" />
<xs:element name="rulerline" type="rulerType" />
</xs:choice>
</xs:sequence>
<xs:attributeGroup ref="rcDesc" />
<xs:attribute name="type" type="formGroupTypeType" />
<xs:attributeGroup ref="backgroundAppearanceDesc" />
<xs:attributeGroup ref="inputFormFieldDesc" />
</xs:complexType>
<!-- <inputLine> mark the input line form field. The user can fill it with a string. -->
<xs:complexType name="inputLineType" mixed="true">
<xs:sequence>
<xs:group ref="borderGroup" />
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="run" type="runType" />
</xs:choice>
</xs:sequence>
<xs:attributeGroup ref="rcDesc" />
<xs:attributeGroup ref="fontDesc" />
<xs:attributeGroup ref="backgroundAppearanceDesc" />
<xs:attributeGroup ref="inputFormFieldDesc" />
<xs:attribute name="nextForm" type="xs:IDREF" />
</xs:complexType>
<!-- <checkBox> is a checkBox input form field. -->
<xs:complexType name="checkBoxType" mixed="true">
<xs:sequence>
<xs:group ref="borderGroup" />
</xs:sequence>
<xs:attributeGroup ref="rcDesc" />
<xs:attributeGroup ref="fontDesc" />
<xs:attributeGroup ref="backgroundAppearanceDesc" />
<xs:attributeGroup ref="inputFormFieldDesc" />
<xs:attribute name="nextForm" type="xs:IDREF" />
</xs:complexType>
<!-- <circleText> is a text what can the user mark with a circle -->
<xs:complexType name="circleTextType" mixed="true">
<xs:sequence>
<xs:group ref="borderGroup" />
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="ch" type="charType" />
<xs:element name="alt" type="altType" />
<xs:element name="run" type="runType" />
<xs:element name="wd" type="wordType" />
<xs:element name="nl" type="nlType" />
<xs:element name="tab" type="tabPositionType" />
<xs:element name="space" type="spaceType" />
</xs:choice>
</xs:sequence>
<xs:attributeGroup ref="rcDesc" />
<xs:attributeGroup ref="fontDesc" />
<xs:attributeGroup ref="backgroundAppearanceDesc" />
<xs:attributeGroup ref="inputFormFieldDesc" />
<xs:attribute name="nextForm" type="xs:IDREF" />
</xs:complexType>
<!-- <fillGraphics> is a area where the user have to draw or write something -->
<xs:complexType name="fillGraphicsType" mixed="true">
<xs:sequence>
<xs:group ref="borderGroup" />
</xs:sequence>
<xs:attributeGroup ref="rcDesc" />
<xs:attributeGroup ref="backgroundAppearanceDesc" />
<xs:attributeGroup ref="inputFormFieldDesc" />
</xs:complexType>
<!-- <ln> is a physical text line may contain charTypes, runTypes and altTypes plus the text of the line itself -->
<xs:complexType name="lnType" mixed="true">
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="ch" type="charType" />
<xs:element name="alt" type="altType" />
<xs:element name="run" type="runType" />
<xs:element name="wd" type="wordType" />
<xs:element name="nl" type="nlType" />
<xs:element name="tab" type="tabPositionType" />
<xs:element name="space" type="spaceType" />
<xs:element name="link" type="linkType" />
<xs:element name="fieldCode" type="fieldCodeType" />
<xs:element name="formGroup" type="formGroupType" />
<xs:element name="inputLine" type="inputLineType" />
<xs:element name="checkBox" type="checkBoxType" />
<xs:element name="circleText" type="circleTextType" />
<xs:element name="fillGraphics" type="fillGraphicsType" />
</xs:choice>
</xs:sequence>
<xs:attributeGroup ref="rcDesc" /> <!-- Bounding Rect of the line -->
<xs:attribute name="baseLine" type="xs:int" /> <!-- The horizontal position of the baseline in twips. Distance between baseline and the top edge of the page. Baseline is an imaginary line where the characters are sitting. -->
<xs:attributeGroup ref="fontDesc" />
<xs:attributeGroup ref="backgroundAppearanceDesc" />
<xs:attribute name="continuityType" />
<xs:attribute name="forcedEOF" type="xs:boolean" default="false" />
</xs:complexType>
<!-- <para> mark the paragraph -->
<xs:complexType name="paraType" mixed="true">
<xs:sequence>
<xs:group ref="paraAttribGroup" />
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="ln" type="lnType" />
<xs:element name="ch" type="charType" />
<xs:element name="alt" type="altType" />
<xs:element name="run" type="runType" />
<xs:element name="wd" type="wordType" />
<xs:element name="nl" type="nlType" />
<xs:element name="tab" type="tabPositionType" />
<xs:element name="space" type="spaceType" />
<xs:element name="link" type="linkType" />
<xs:element name="fieldCode" type="fieldCodeType" />
<xs:element name="formGroup" type="formGroupType" />
<xs:element name="inputLine" type="inputLineType" />
<xs:element name="checkBox" type="checkBoxType" />
<xs:element name="circleText" type="circleTextType" />
<xs:element name="fillGraphics" type="fillGraphicsType" />
</xs:choice>
</xs:sequence>
<xs:attributeGroup ref="paraDesc" />
<xs:attribute name="id" type="xs:ID" /> <!-- Unique Id of the paragraph. It is used by the anchor/@refTo. -->
<xs:attribute name="styleRef" type="xs:IDREF" /> <!-- It identifies a style. This have to equal style/@styleID -->
<xs:attribute name="linkTo" type="xs:IDREF" /> <!-- It identifies a paragraph. Paragraphs what are link together is one paragraph but technically we have to separate it. (e.g. These are on different column or page). This have to equal para/@id -->
<xs:attributeGroup ref="rcDesc" /> <!-- Bounding rect of the paragraph -->
</xs:complexType>
<!-- <picture> is a picture. -->
<xs:complexType name="picType">
<!-- In rectangular case we only use the attributes (l, t, r, b) without child shapes,
while in irregular cases we use the shapes child elements to describe the shape, and
using the attributes (l, t, r, b) to describe the bounding box. -->
<xs:sequence>
<xs:element name="shape" type="shapeType" minOccurs="0" maxOccurs="1" />
</xs:sequence>
<xs:attributeGroup ref="rcDesc" />
<xs:attribute name="id" type="xs:ID" />
<xs:attributeGroup ref="paralikeDesc" />
<xs:attribute name="file" type="xs:string" /> <!-- The path of the saved picture. -->
</xs:complexType>
<!-- <cell> is a cell in the table. It can be cover more than one grid. -->
<xs:complexType name="cellType">
<xs:sequence>
<xs:group ref="borderGroup" /> <!-- Border of the cell. -->
<xs:choice maxOccurs="unbounded">
<xs:element name="para" type="paraType" minOccurs="0" />
<xs:element name="picture" type="picType" minOccurs="0" />
</xs:choice>
</xs:sequence>
<xs:attribute name="gridColFrom" type="xs:int" use="required" /> <!-- The horizontal index of the column grid, where starts the cell. -->
<xs:attribute name="gridColTill" type="xs:int" use="required" /> <!-- The horizontal index of the column grid, where ends the cell. -->
<xs:attribute name="gridRowFrom" type="xs:int" use="required" /> <!-- The vertical index of the row grid, where starts the cell. -->
<xs:attribute name="gridRowTill" type="xs:int" use="required" /> <!-- The vertical index of the row grid, where ends the cell. -->
<xs:attributeGroup ref="backgroundAppearanceDesc" />
<xs:attribute name="alignment" type="alignmentType" /> <!-- Horizontal alignment of the containment in the cell -->
<xs:attribute name="verticalAlignment" type="verticalAlignmentType" /> <!-- Vertical alignment of the containment in the cell -->
<xs:attributeGroup ref="innerMarginDesc" /> <!-- The distance between cell border and text in cell. -->
</xs:complexType>
<!-- <table> describe a table object. -->
<!-- A table consist of a gridTable and cells.
The gridTable describe the number of row, the number of column and the sizes of these.
A cell can cover more than one row and/or column
The vertical position of the first column grid equal with the left side of the container (column, dd, frame) plus the left indent of the table.
The vertical position of the next column grid equal with the first column grid position plus the first value in the <gridCol>
The horizontal positon of the first row grid equal with the top side of the container plus the space before of the table.
The horizontal position of the next row grid equal with the first row grid position plus the first value in the <gridRow>-->
<xs:complexType name="tableType">
<xs:sequence>
<xs:group ref="borderGroup" /> <!-- Outside border of the table -->
<xs:element name="gridTable" type="gridTableType" minOccurs="1" maxOccurs="1" />
<xs:element name="cell" type="cellType" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
<xs:attributeGroup ref="rcDesc" /> <!-- Bounding rect of the table -->
<xs:attribute name="id" type="xs:ID" />
<xs:attributeGroup ref="paralikeDesc" />
</xs:complexType>
<!-- <frame> hold togheter one or more paragraphlike (paragraph, picture, table) when these have the same border or background. -->
<xs:complexType name="frameType">
<xs:sequence>
<xs:group ref="borderGroup" />
<xs:choice maxOccurs="unbounded">
<xs:element name="para" type="paraType" minOccurs="0" />
<xs:element name="picture" type="picType" minOccurs="0" />
<xs:element name="table" type="tableType" minOccurs="0" />
<xs:element name="rulerline" type="rulerType" minOccurs="0" />
</xs:choice>
</xs:sequence>
<xs:attributeGroup ref="rcDesc" />
<xs:attributeGroup ref="backgroundAppearanceDesc" />
<xs:attribute name="language" type="languageType" default="en" />
<xs:attribute name="textDirection" type="textDirectionType" default="left2right" />
</xs:complexType>
<!-- <column> is a column of flowing text. -->
<xs:complexType name="columnType">
<xs:sequence>
<xs:group ref="borderGroup" />
<xs:element name="rightRulerLine" type="rulerType" minOccurs="0" maxOccurs="1" />
<xs:choice maxOccurs="unbounded">
<xs:element name="para" type="paraType" minOccurs="0" />
<xs:element name="picture" type="picType" minOccurs="0" />
<xs:element name="table" type="tableType" minOccurs="0" />
<xs:element name="frame" type="frameType" minOccurs="0" />
<xs:element name="rulerline" type="rulerType" minOccurs="0" />
<xs:element name="dd" type="ddType" minOccurs="0" />
</xs:choice>
</xs:sequence>
<xs:attributeGroup ref="rcDesc" />
<xs:attributeGroup ref="backgroundAppearanceDesc" />
<xs:attribute name="hasBreak" type="xs:boolean" default="false" /> <!-- The text in the next column have to be in a new column -->
</xs:complexType>
<!-- <section> is a part of document what contains flowing text (one or more columns) The text in the section haven't exact position, it depends on the text before -->
<xs:complexType name="sectionType">
<xs:sequence>
<xs:group ref="borderGroup" /> <!-- Border of the flowing text -->
<xs:element name="column" type="columnType" minOccurs="1" maxOccurs="unbounded" />
</xs:sequence>
<xs:attributeGroup ref="rcDesc" />
<xs:attribute name="language" type="languageType" default="en" />
<xs:attribute name="textDirection" type="textDirectionType" default="left2right" />
</xs:complexType>
<!-- <dd> is a fix object what can press out the flowing text. The position of it doesn't altering depending on the surroundings. -->
<xs:complexType name="ddType">
<xs:sequence>
<!-- In rectangular case we only use the attributes (l, t, r, b) without child shapes,
while in irregular cases we use the shapes child elements to describe the shape, and
using the attributes (l, t, r, b) to describe the bounding box. -->
<xs:element name="shape" type="shapeType" minOccurs="0" maxOccurs="1" />
<xs:group ref="borderGroup" />
<xs:choice maxOccurs="unbounded">
<xs:element name="para" type="paraType" minOccurs="0" />
<xs:element name="picture" type="picType" minOccurs="0" />
<xs:element name="table" type="tableType" minOccurs="0" />
<xs:element name="frame" type="frameType" minOccurs="0" />
<xs:element name="rulerline" type="rulerType" minOccurs="0" />
<xs:element name="dd" type="ddType" minOccurs="0" />