forked from IHE-SDC-WG/SDC-Schema-Packages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSDCFormDesign.xsd
1490 lines (1429 loc) · 90.9 KB
/
SDCFormDesign.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 elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:ihe:qrph:sdc:2016" xmlns="urn:ihe:qrph:sdc:2016">
<!-- 9/15/2016 Changes for IHE Profile Trial Implementation (for Jan 2017 Connectathon) -->
<xs:include schemaLocation="SDCResources.xsd"/>
<xs:include schemaLocation="SDCExpressions.xsd"/>
<xs:element name="FormDesign" type="FormDesignType">
<xs:annotation>
<xs:documentation>Root element of this Schema</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="FormDesignType">
<xs:annotation>
<xs:documentation>Start here. This is the top level of the SDCFormDesign object model. It represents the definition for the information content of a single data-entry form. </xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="IdentifiedExtensionType">
<xs:sequence minOccurs="0">
<xs:element minOccurs="0" name="BeforeLoadForm" type="EventType">
<xs:annotation>
<xs:documentation>NEW:
This event is fired before the page is loaded into memory, and before stored form data is loaded. It may be used, e.g., for authentication, to retrieve/prepare stored data, and/or to control form rendering according to user preferences.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="BeforeLoadData" type="EventType">
<xs:annotation>
<xs:documentation>NEW:
This event is fired after the page is loaded into memory, before stored form data is loaded, and before the form is visible. For example, It may be used to determine the data to be loaded and to perform the data loading.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="BeforeShowForm" type="EventType">
<xs:annotation>
<xs:documentation>NEW:
This event is fired after the page is loaded is memory, after the data is loaded into the form, but before the form is displayed. It may be used to perform form activities that are controlled by the loaded data.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="BeforeDataSubmit" type="EventType"/>
<xs:element minOccurs="0" name="BeforeCloseForm" type="EventType"/>
<xs:element name="Header" type="SectionItemType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>Optional Section that stays at the top of a form.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Body" type="SectionItemType" maxOccurs="1">
<xs:annotation>
<xs:documentation>Main Section of form</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Footer" type="SectionItemType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>Optional Section that stays at the bottom of a form.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="Rules" type="RulesType"> </xs:element>
</xs:sequence>
<xs:attribute name="formTitle" type="xs:string">
<xs:annotation>
<xs:documentation>NEW: human readable title for display when choosing forms. Added 4/27/16</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="filename" type="xs:string">
<xs:annotation>
<xs:documentation>NEW: filename to use when the current FormDesign instance is saved as a file.
For forms containing responses, the filename may include the formInstanceVersionURI,
but the naming convention may be use-case-specific.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="basedOnURI" type="URI_Atype">
<xs:annotation>
<xs:documentation>NEW: URI used to identify the form that that this FormDesign is based upon. In most cases, this should be a standard form that is modified and/or extended by the current FormDesign.
The current template reuses the basedOn IDs whenever the question/answer/semantic context is identical to the original.
5/11/17: Relying on data element mapping may be a better and more flexible approach than @basedOnURI. In this way, forms could compare data elements to determine if they contain semantic matches, and this is supported better with a more robust code map section.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="prevVersionURI" type="URI_Atype">
<xs:annotation>
<xs:documentation>NEW: URI used to identify the form that is the immediate previous version of the current FormDesign</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="formInstanceURI" type="URI_Atype">
<xs:annotation>
<xs:documentation>NEW: Unique URI used to identify a unique instance of a form. Used for tracking form responses across time and across multiple episodes of editing by end-users. This URI does not change for each edit session of a form instance.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="formInstanceVersionURI" type="URI_Atype">
<xs:annotation>
<xs:documentation>NEW: Unique URI used to identify a unique instance of a form's saved responses. It is used for tracking form responses across time and across multiple episodes of editing by end-users. This URI must change for each edit/save session of a form instance. It may be e.g., a new GUID, or a repeat of the formInstanceID followed by a version number.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="formPreviousInstanceVersionURI" type="URI_Atype">
<xs:annotation>
<xs:documentation>NEW: Unique URI used to identify the immediate previous instance of a form containing responses. This is the @formInstanceVersionURI that represents the instance of the form that the user opened up before beginning a new cycle of edit/save. This attribute is used for tracking form responses across time and across multiple episodes of editing by end-users. This URI must change for each edit session of a form instance.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="ResponseAttributes"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ChildItemsType">
<xs:annotation>
<xs:documentation>ChildItems have descendants that are of type DisplayedType. They may include primary items of type SectionType, QuestionType, InjectFormType, DisplayedType and ButtonType, in any order. The ChildItem separates new child primary items from elements and attributes that are sub-parts of the parent primary item.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="ExtensionBaseType">
<xs:choice maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>DisplayedType choices</xs:documentation>
</xs:annotation>
<xs:element name="Section" type="SectionItemType" minOccurs="0">
<xs:annotation>
<xs:documentation>A Section is a grouper for other types of objects.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Question" type="QuestionItemType" minOccurs="0">
<xs:annotation>
<xs:documentation>A Question may take 3 basic forms:
QS: single-select answer response
QM: multi-select - more than one answer may be selected
QF: fill-in response; no answer choices are present for selection
QS and QM are associated with a ListField of answer choices. The ListField may contain a List with ListItems (expicitly stated answer choices), or it may contain a LookupEndpoint field that populates the list from a web service.
See @maxSelections on ListField for information on distinguishing QS from QM.
QF is identified by the presence of a ResponseField child, which describes how the fill-in response should be recorded. </xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DisplayedItem" minOccurs="0" type="DisplayedType">
<xs:annotation>
<xs:documentation>The DisplayedItem contains title, Blob (Binary Large Object), and/or Link content, and may also include Contacts and CodedValues that relate to the Note/Blob/Link objects. DisplayedItems may be interspersed with other MainItems or ListItem nodes. The parent items may be Section, Question, and ListItem. However, DisplayedItems are not "attached" to any specific item Section, Question, or ListItem. Instead they are free-floating items that can appear anywhere on a form, such as between ListItem nodes.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ButtonAction" type="ButtonItemType" minOccurs="0">
<xs:annotation>
<xs:documentation>A Button is a visible area that can be selected ("clicked") to trigger event code to perform an action. It is ordinarily implemented with an image that looks like a rectangular button object, but a button can look like anything.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="InjectForm" minOccurs="0" type="InjectFormType">
<xs:annotation>
<xs:documentation>InjectForm is a link to a form (or portion of a form) that is imported into the current form at specific sites.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:choice>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="InjectFormType">
<xs:annotation>
<xs:documentation>CHANGED:
This type represents a form or portion of a form that is imported into the current form at a specific location. It allows the composition of forms from other forms or parts of other forms.
In practice, using an injected section will requiresome or all of the injected FormDesignXML to be injected under this the InjectForm element. For that reason, the schema supports those elements to appear inline. However, in a "raw" form (not yet filled out), the FormDesign element would generally be empty; only the top-level InjectFormType attributes would be used to point to the parts to be later injected.
Form parts to be injected are specified by packageID, not FormID. This allows an injected form to be assocaited with helper files, or to return previosuly completed form parts containing responses.
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="IdentifiedExtensionType">
<xs:choice minOccurs="0">
<xs:element name="Section" type="SectionItemType"/>
<xs:element name="Question" type="QuestionItemType"/>
<xs:element name="FormDesign" type="FormDesignType"/>
</xs:choice>
<xs:attribute name="packageID" type="URI_Atype">
<xs:annotation>
<xs:documentation>This ID represents the Package that contains the form to be injected.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="rootItemID" type="URI_Atype">
<xs:annotation>
<xs:documentation>The rootItemID is the ID of the form part that will be injected. If empty, then the entre form shoudl be injected under the FormDesign element node. If not empty, it must point to a valid Section or Question.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="injectionID" type="xs:string">
<xs:annotation>
<xs:documentation>Unique ID (GUID) to distinguish multiple instances of the same injected node.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="LookupEndPointType">
<xs:annotation>
<xs:documentation>LookupEndPointType represents list items that are derived from a web service call of some type, instead of an explicit set of ListItem nodes specified in the FormDesign XML. The endpoint must return a list separated into individual list items by the @colTextDelimiter value specified in the parent ListFieldType.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="FuncType">
<xs:sequence maxOccurs="1">
<xs:element maxOccurs="unbounded" minOccurs="0" name="ResponseValue" type="CodingType">
<xs:annotation>
<xs:documentation>The user's response to the lookup list. The response is recorded as a coding, terminology, classification, keyword, or local value. Multiple selections from the lookup list may be allowed.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="includesHeaderRow" type="xs:boolean" default="false"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ListItemType">
<xs:annotation>
<xs:documentation>ListItem elements represent answer choices that may appear under a Question.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="ListItemBaseType">
<xs:choice minOccurs="0">
<xs:element name="ChildItems" type="ChildItemsType" minOccurs="0"/>
</xs:choice>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ListItemBaseType" block="">
<xs:annotation>
<xs:documentation>This base element is the foundation for ListItems, but does not include the MainItems sub-group under each ListItem.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="DisplayedType">
<xs:sequence>
<xs:element name="ListItemResponseField" minOccurs="0" maxOccurs="1" type="ListItemResponseFieldType">
<xs:annotation>
<xs:documentation>A place to enter values (of any data type) that are directly associated with, and attached to, a selected answer choice.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="OnSelect" maxOccurs="unbounded" minOccurs="0" type="EventType"> </xs:element>
<xs:element name="OnDeselect" maxOccurs="unbounded" minOccurs="0" type="EventType"> </xs:element>
<xs:element name="SelectIf" minOccurs="0" type="WatchedPropertyType"> </xs:element>
<xs:element name="DeselectIf" minOccurs="0" type="WatchedPropertyType"> </xs:element>
</xs:sequence>
<xs:attribute name="selected" type="xs:boolean" default="false">
<xs:annotation>
<xs:documentation>Represents the default value of the ListItem in the FormDesign template, or the user's response in selecting one or more ListItems. If @multiSelect='false' on ListField then only one item may be selected.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="selectionDisablesChildren" type="xs:boolean" default="false">
<xs:annotation>
<xs:documentation>If set to true, then selecting this ListItem must deactivate all descendant parts of the form, and ignore any user-entered values in the deactivated part. Deselecting the ListItem should reactivate the descendant items in their state at the time the items were deactivated.
If items are disabled, then any data stored in the disabled questions should be removed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="selectionActivatesItems" type="xs:NMTOKENS">
<xs:annotation>
<xs:documentation>NEW
Selecting the current ListItem will enable the named items in this attribute's content.
Prefixing any named with a hyphen (-) will reverse the above behaviour (i.e., the named items will be disabled).
Unselecting the ListItem will reverse this behaviour.
Prefixing the name with a tilde (~) will supress this reversal behavior.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="selectionSelectsListItems" type="xs:NMTOKENS">
<xs:annotation>
<xs:documentation>NEW
Selecting the current ListItem will select the named ListItems in this attribute's content.
Prefixing any named with a hyphen (-) will reverse the above behaviour.
Unselecting the ListItem will reverse this behaviour.
Prefixing the name with a tilde (~) will supress this reversal behavior.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="selectionDeselectsSiblings" type="xs:boolean" default="false">
<xs:annotation>
<xs:documentation>If the ancestor ListField has @multiselect = 'true', then selecting this ListItem should de-select all other ListItem (sibling) nodes except the current one.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="X_selectionDisablesItems" type="xs:NMTOKENS">
<xs:annotation>
<xs:documentation>NEW</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="X_SelectionDeselectsListItems" type="xs:NMTOKENS">
<xs:annotation>
<xs:documentation>NEW:
Selecting the current ListItem will cause the named items in the list (or any other list) to be de-selected. All named items must be prefixed with the $ symbol, and must point to ListItems.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="omitWhenSelected" type="xs:boolean" default="false">
<xs:annotation>
<xs:documentation>NEW:
If @omitWhenSelected is set to true, then the question and its response(s) should not be present in a typical report derived from this template. This attribute is usually set to true when the answer choice is used to control form behavior (e.g., skip logic), or when the question provides unhelpful "negative" information about actions that did not occur or were not performed, or things that were not observed or could not be assessed. If @omitWhenSelectedset is false (default) then the question and its response(s) should appear in the report. Added 11/29/15 to replace @reportAction</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="ResponseReportingAttributes"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ListType">
<xs:annotation>
<xs:documentation>This type represents a list of specified answer choices.
CHANGED 9/20/2016: Fix for serialization error which aggregated all DisplayedItems at the top of the ListItems.
A Schematron (or similar validation tool) will be required to ensure that at least 2 ListItems are present for single-select questions, and one ListItem for multi-select questions.
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="ExtensionBaseType">
<xs:choice maxOccurs="unbounded">
<xs:element minOccurs="0" name="DisplayedItem" type="DisplayedType"/>
<xs:element name="ListItem" type="ListItemType" minOccurs="1" maxOccurs="1"/>
</xs:choice>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ListFieldType">
<xs:annotation>
<xs:documentation>ListField is a grouper for list-like answer choices, which may be derived from either a set of answer choice lists (a List composed of ListItems) or or a list obtained from a LookupEndpoint URI.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="ExtensionBaseType">
<xs:sequence>
<xs:element minOccurs="0" name="ListHeaderText" type="RichTextType">
<xs:annotation>
<xs:documentation>The header row for a set of list items. If the list has more than one column, the column text is separated by the colTextDelimiter.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element maxOccurs="1" minOccurs="0" name="DefaultListItemDataType" type="DataTypes_DEType">
<xs:annotation>
<xs:documentation>Data type enumeration derived from W3C XML Schema. This element is used only if the ListItems are all associated with coded values from a single coding system.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element maxOccurs="1" minOccurs="0" name="DefaultCodeSystem" type="CodeSystemType">
<xs:annotation>
<xs:documentation>If coded values are used for items in a List (including ListItem and LookupEndPoint lists), then the default coding system should be specified here. For ListItem nodes, any exceptions to the coding system may be specified on the individual ListItem nodes. For LookupEndPoints, the endpoint data can optionally specify any exceptions in a dedicated CodeSystem column in the returned list data.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:choice>
<xs:element name="List" type="ListType">
<xs:annotation>
<xs:documentation>List refers to a set of possible answer choices for the user to select. Child DisplayedItems may be interspersed with Child ListItems. At least one ListItem must be present for a multi-select question, and at least two ListItems must pre present for single-select questions.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="LookupEndPoint" minOccurs="1" maxOccurs="1" type="LookupEndPointType">
<xs:annotation>
<xs:documentation>LookupEndPoint is used when the list items are derived from a web service call of some type, instead of an explicit set of ListItem nodes specified in the FormDesign XML. The endpoint must return a list separated into individual list items by the @colTextDelimiter value specified in the parent ListFieldType.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:choice>
<xs:element maxOccurs="unbounded" minOccurs="0" name="IllegalListItemPairings" type="RuleSelectionTestType"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="IllegalCoSelectedListItems" type="RuleISingleSelectionSetsType"/>
<xs:element minOccurs="0" name="AfterChange" maxOccurs="unbounded" type="EventType">
<xs:annotation>
<xs:documentation>Event that occurs after List Field selections are changed.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element maxOccurs="unbounded" minOccurs="0" name="OnEvent" type="OnEventType"/>
</xs:sequence>
<xs:attribute default="|" name="colTextDelimiter">
<xs:annotation>
<xs:documentation>Character in the DisplayText that separates the columns and rows in a single or multi-column list.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute default="1" name="numCols" type="xs:unsignedByte">
<xs:annotation>
<xs:documentation>Number of columns in the list</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute default="1" name="storedCol" type="xs:unsignedByte">
<xs:annotation>
<xs:documentation>Determines which column of the list is stored in a database. This list is one-based.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute default="1" name="minSelections">
<xs:annotation>
<xs:documentation>Minimum number of answer choices (list items) that must be selected by the user. Default value is 1.
NEW: changed minimum value to 1.
Removed: If set to 0, then this question need not be answered by the user.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:unsignedShort">
<xs:minInclusive value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute default="1" name="maxSelections" type="xs:unsignedShort">
<xs:annotation>
<xs:documentation>Maximum number of answer choices (list items) that can be selected by the user. Must be greater than or equal to minSelections, and no larger than the total number of list items.
A value of 0 indicates no limit to the number of selected list items (answers). This effectively means that the question is multi-select. (Abbreviated as QM)
A value of 1 (the default) indicates that the question list is single-select. (Abbreviated as QS)</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute default="true" name="ordered" type="xs:boolean">
<xs:annotation>
<xs:documentation>If false, then the form implementation may change the order of items in the list.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ResponseFieldType">
<xs:annotation>
<xs:documentation>This type is a template for a data entry field that accepts entries (responses or answers) of any data type, including text, numbers, dates, and Base 64 - encoded blobs (images, sounds, video, other binary formats, etc.). This type cannot contain ListItems, but it may be a child of a Question or a ListItem.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="ExtensionBaseType">
<xs:sequence>
<xs:choice>
<xs:element name="Response" type="DataTypes_DEType" minOccurs="1" maxOccurs="1">
<xs:annotation>
<xs:documentation>W3C Schema data type details</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="SetValue" type="Any.Functions.AnyType">
<xs:annotation>
<xs:documentation>NEW</xs:documentation>
</xs:annotation>
</xs:element>
</xs:choice>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Extension" type="ExtensionType"> </xs:element>
<xs:element name="TextAfterResponse" type="RichTextType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>TextAfterResponse is fixed text that appears after (to the right of) the user's response on the data entry form. This may be text for units such as "mm", "cm", etc.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ResponseUnits" minOccurs="0" maxOccurs="1" type="UnitsType">
<xs:annotation>
<xs:documentation/>
</xs:annotation>
</xs:element>
<xs:element maxOccurs="unbounded" name="AfterChange" type="EventType" minOccurs="0">
<xs:annotation>
<xs:documentation>Event that occurs after the Response value is changed, usually fired after a user leaves the Response field.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element maxOccurs="unbounded" minOccurs="0" name="OnEvent" type="OnEventType"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:attributeGroup name="ResponseAttributes">
<xs:attribute name="responseTypeEnum">
<xs:annotation>
<xs:documentation>Allows the form filler to specify whether the current response is the initial response, or records the type of change made since the initial response was reported.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="initial"/>
<xs:enumeration value="correction"/>
<xs:enumeration value="update"/>
<xs:enumeration value="addition"/>
<xs:enumeration value="deletion"/>
<xs:enumeration value="multiple_changes"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="responseStatusEnum">
<xs:annotation>
<xs:documentation>Expresses the finality of the response, e.g., draft, pending, tentative, final and retracted.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="draft"/>
<xs:enumeration value="pending"/>
<xs:enumeration value="preliminary"/>
<xs:enumeration value="final"/>
<xs:enumeration value="retracted"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:attributeGroup>
<xs:attributeGroup name="ResponseReportingAttributes">
<xs:annotation>
<xs:documentation>Used to extend identified items (Section, Question, ListItem) for nested/repeating responses in reports and data transmissions.</xs:documentation>
</xs:annotation>
<xs:attribute default="1" name="repeat" type="xs:positiveInteger">
<xs:annotation>
<xs:documentation>For repeating questions and sections, @repeat represents the repeat ordinality, starting with 1.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="instanceGUID" type="xs:string">
<xs:annotation>
<xs:documentation>A globally unique string assigned to a repeating Question or Section, Injected Form, or any selected answer ListItem. This attribute's value is assigned at the time that answers are entered into a form, to unambiguously identify a single instance among sections or questions, including those that are allowed to repeat and nest deeply. </xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="parentGUID" type="xs:string">
<xs:annotation>
<xs:documentation>A globally unique string assigned from a Section, Question, ListItem or InjectedForm to the ID of its parent node (S, Q, LI or IF). This attribute's value is assigned at the time that answers are entered into a form, to unambiguously identify a single instance among the above objects, including those that are allowed to repeat and nest deeply. </xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>
<xs:complexType name="ListItemResponseFieldType">
<xs:annotation>
<xs:documentation>This type represents a place to store a fill-in response associated directly with a selected ListItem. The response may be optional or required.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="ResponseFieldType">
<xs:attribute name="responseRequired" type="xs:boolean" default="false">
<xs:annotation>
<xs:documentation>If @responseRequired is set to true, then the appropriate text or Blob must be entered in the data-entry field associated with this list item.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ButtonItemType">
<xs:annotation>
<xs:documentation>The ButtonAction type represents a visual area for a user to click, and the click triggers a piece of "Action" code to run inside the form. The ButtonAction object may be represented with a visible button object, or some other type of visual paradigm. Other types of actions (e.g. key presses in a text field) may be handled with the form framework's event model.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="DisplayedType">
<xs:choice>
<xs:element minOccurs="0" name="OnClick" type="EventType"/>
</xs:choice>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="SectionItemType">
<xs:annotation>
<xs:documentation>The Section is a grouper for all other types of objects. It may have a distinctive visual display (e.g. a box containing other displayed objects), and it may be used to treat Section descendants as a unit for special handling, such as hiding and showing. </xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="SectionBaseType">
<xs:choice minOccurs="0">
<xs:annotation>
<xs:documentation>MainNodes choices</xs:documentation>
</xs:annotation>
<xs:element name="ChildItems" type="ChildItemsType" minOccurs="0">
<xs:annotation>
<xs:documentation>Child items are of type DisplayedType. They may include items of type SectionType, QuestionType, InjectFormType, DisplayedType and ButtonType, in any order.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:choice>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="SectionBaseType">
<xs:annotation>
<xs:documentation>This base item is the same as the SectionItemType, except it lacks the recursion created by the inclusion of MainItems sub-group.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="RepeatingType">
<xs:attribute default="true" name="ordered" type="xs:boolean">
<xs:annotation>
<xs:documentation>If false, then the form implementation may change the order of items in the section.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="ResponseAttributes"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="QuestionItemType">
<xs:annotation>
<xs:documentation>Represents questions. Parent items may be Section, Question, and ListItem.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="QuestionItemBaseType">
<xs:choice minOccurs="0">
<xs:element name="ChildItems" type="ChildItemsType" minOccurs="0"/>
</xs:choice>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="QuestionItemBaseType">
<xs:annotation>
<xs:documentation>Represents questions. Parent items may be Section, Question, and ListItem.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="RepeatingType">
<xs:choice maxOccurs="1">
<xs:annotation>
<xs:documentation>Choice (ResponseField, ListField)</xs:documentation>
</xs:annotation>
<xs:element name="ResponseField" type="ResponseFieldType" minOccurs="1" maxOccurs="1"/>
<xs:element name="ListField" minOccurs="1" maxOccurs="1" type="ListFieldType"> </xs:element>
</xs:choice>
<xs:attribute default="false" name="readOnly" type="xs:boolean">
<xs:annotation>
<xs:documentation>If @readOnly is set to true, the this field may not be edited by the user, and any default values set by template should be considered part of the stored data set responses, and transmitted by the SubmitForm transaction.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="ResponseAttributes"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="RepeatingType" abstract="true">
<xs:annotation>
<xs:documentation>This type presents any display objects that may be repeated based upon on the user's interaction with the form objects. Items derived from this type include Sections and Questions.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="DisplayedType">
<xs:attribute name="minCard" type="xs:unsignedShort" default="1">
<xs:annotation>
<xs:documentation>@minCard is the minimum number of repetitions allowed for a section or question. The default value is 1, indicating that the user must answer any question(s) that has this attribute set. If @minCard is set to 0, then the item and all descendent questions are optional to answer.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="maxCard" default="1" type="xs:unsignedShort">
<xs:annotation>
<xs:documentation>@maxCard is the maximum number of repetitions allowed for a section or question. The default value is 1, indicating that the section or question cannot be repeated on the data entry form. A value of 0 indicates that the number of repeats is unlimited. If @maxCard is not 0, then Must be greater than or equal to minCard. </xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="ResponseReportingAttributes"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DisplayedType">
<xs:annotation>
<xs:documentation>This type represents any object that is designed to have a visual presence on a form, e.g., Sections, Questions, ListItems, Notes and Blobs. (Other items not inheriting this type may use an optional styleClass attribute.)</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="IdentifiedExtensionType">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Link" type="LinkType">
<xs:annotation>
<xs:documentation>Link to external information.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="BlobContent" type="BlobType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Blob information associated with the current DisplayedType. The blob may contain any type of special media, but must be base 64 encoded.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element maxOccurs="unbounded" name="Contact" type="ContactType" minOccurs="0">
<xs:annotation>
<xs:documentation>Any desired contact information regarding, e.g., the form item, authoring process, certifications, code or coding processs.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element maxOccurs="unbounded" minOccurs="0" name="CodedValue" type="CodingType">
<xs:annotation>
<xs:documentation>Coding, terminology, classification, keyword, or local values</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="OnEnter" type="EventType" maxOccurs="unbounded"/>
<xs:element minOccurs="0" name="OnExit" type="EventType" maxOccurs="unbounded"/>
<xs:element minOccurs="0" name="OnEvent" maxOccurs="unbounded" type="OnEventType">
<xs:annotation>
<xs:documentation>Generic event handler - eventName must be specified.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="ActivateIf" type="WatchedPropertyType">
<xs:annotation>
<xs:documentation>Activate the DisplayedType item if the contained conditions are met.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="DeActivateIf" type="WatchedPropertyType">
<xs:annotation>
<xs:documentation>DeActivate the DisplayedType item if the contained conditions are met.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="title" type="xs:string">
<xs:annotation>
<xs:documentation>The primary text to show on the form. Also known as "prompt" or "label" or "visibleText" or "caption"</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute default="true" name="enabled" type="xs:boolean">
<xs:annotation>
<xs:documentation>Determines whether the user can interact with the displayed item when the form is first displayed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute default="true" name="visible" type="xs:boolean">
<xs:annotation>
<xs:documentation>Determines whether the item should be visible on a computer screen when the form is first displayed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute default="true" name="mustImplement" type="xs:boolean">
<xs:annotation>
<xs:documentation>If this attribute is set to "true" (the default), then the form implementation must make this item available for use on the form. If this attribute is set to "false" on a parent or ancestor item, then all child/descendant items inherit this "false" setting, even if they have this attribute set to "true." In other words, the child/descendent items do not need to be implemented if any parent/ancestor item has this attribute set to false. </xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute default="True" name="showInReport">
<xs:annotation>
<xs:documentation>CHANGED to T/F/Optional
If @showInReport on a Question is false, then the Question and its ListItems (if any) should not be present in a typical report derived from this template. If this attribute appears on a ListItem, then the entire question and all ListItems should be omitted from the report. If this attribute appears on a Section, then the entire Section and all Section contents (descendents) should be omitted from the report. If @showInReport appears on a DisplayedItem, then the DisplayedItem (and all sub-items) should be omitted from the report.
This attribute is usually set to false when a Question is used to control form behavior (e.g., skip logic), or when the Question provides unhelpful "negative" information about actions that did not occur or were not performed, or things that were not observed.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="True"/>
<xs:enumeration value="False"/>
<xs:enumeration value="Optional"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="RulesType">
<xs:annotation>
<xs:documentation>Rules are procedures that affect form behaviour. They are usually triggered by changes to the form by a form user. They may also be triggered by other rules or changes to form metadata (e.g., change to @visible).
SDC decarative form rules consist of several types:
Assertions are "predicate" expressions that evaulate to true or false, based upon the state of answers/responses or metadata within a form. An asserion is equivalent to the "If" part of an If-Then block. The implementation framework must assign a fucntion to handle any assertion that evaluates to False. Assertions are no handled by the form itself.
If-Then-Else blocks run a "Then" action if the "If block evaluated to true, and an "Else" block if the "If" block evaluates to false.
An AutoSelection rule automatically selects an answer choice (ListItem) when another answer (or set of answers) is selected or unselected.
IllegalSelectionTest evaluates to true if a disallowed set of answer choices is selected at the same time. The implementation should take an action (alert user, cancel inout, etc) when a true result occurs.
IllegalSelection Set restricts combinations of co-selected ListItems (answers). In other words, only zero or one item in this list may be selected at a time.
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="ExtensionBaseType">
<xs:sequence maxOccurs="unbounded">
<xs:element minOccurs="0" name="PollingRules" type="RulesCollectionType" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Polling rules run "If clauses" periodically (e.g., when a user changes a response value or clicks a ListItem) and run any indicated "Then clause." In general, these rules should run without the need for any user interaction. The form can use the observer (publish-subscribe or event) pattern to implement this functionality.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element maxOccurs="unbounded" minOccurs="0" name="ReferenceRules" type="RulesCollectionType">
<xs:annotation>
<xs:documentation>Rules that are called (by referencing the rule's @name attribute) from another place in the form.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="GetItemAttribValuesType">
<xs:annotation>
<xs:documentation>In the PropertyValues condition, the contained Boolean attributed values are ANDed together (by default) to return a derived Boolean value. Omitted (null) values are ignored and not used for null propagation.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="ReturnBoolType">
<xs:attributeGroup ref="BoolAttributes"/>
<xs:attribute name="itemNames" type="xs:NMTOKENS" use="required">
<xs:annotation>
<xs:documentation>Required name(s) of the item(s) (Section, Question, List Item) that contains the item properties used in the other attributes.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="isSelected" type="xs:boolean"/>
<xs:attribute name="isActive" type="xs:boolean">
<xs:annotation>
<xs:documentation>If visible and enabled are both true, then isActive is true. Otherwise, it is false.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="hasSelectionsGTE" type="xs:nonNegativeInteger">
<xs:annotation>
<xs:documentation>Applies only to Questions that have selection lists (ListItems or LookupField). Evaluates to true if the number of selected items equals or exceeds the entered value.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="hasSelectionsLTE" type="xs:nonNegativeInteger">
<xs:annotation>
<xs:documentation>Applies only to Questions that have selection lists (ListItems or LookupField). Evaluates to true if the number of selected items is less than or equal to the entered value.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="hasSelectionsExact" type="xs:nonNegativeInteger">
<xs:annotation>
<xs:documentation>Applies only to Questions that have selection lists (ListItems or LookupField). Evaluates to true if the number of selected items equals the entered value.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="hasResponse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Applies only to items that have Response Fields (Questions and ListItems). If the ListItem or Question has a Response Field, and that field has a value in it, this property returns true. If it does not have a value, it returns false. If no Response Field is present, it retuns null and is not used for Boolean comparisons. </xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="isVisible" type="xs:boolean"/>
<xs:attribute name="isEnabled" type="xs:boolean"/>
<xs:attribute name="isRequired" type="xs:boolean">
<xs:annotation>
<xs:documentation>If the minCard value is greater than 0, then isRequired = "true"
If the minCard = "0" then isRequired = "false"</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="isReadOnly" type="xs:boolean"/>
<xs:attribute name="hasType" type="xs:NMTOKENS"/>
<xs:attribute name="hasStyleClass" type="xs:NMTOKENS"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:attributeGroup name="IfAttributes">
<xs:attribute name="onlyIf" type="xs:boolean" default="false">
<xs:annotation>
<xs:documentation>(reversible); If onlyIf is true, then the stipulated Boolean actions, which are executed when the If conditions evaluate to true, are reversed when the conditions evaluate to false.
If onlyIf="true", the target items assume the chosen attribute values (e.g., selected, activated) ONLY when the action condition(s) are satisfied. If the conditions are not satisfied, then all Boolean actions assume the opposite state (e.g., unselected, inactive).
Manually changing the attributes on the target item (upon which the actions are executed) will not affect any attributes in the controlling items. It is possible to disable (enabled="false") the target item so that its attributes can only be be changed programmatically.
The default value is "false" indicating that the the rule runs when the "If" condition is "true." The attached action will not reverse (be undone) when the "If" condition evaluates to "false."
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>
<xs:complexType name="IfType">
<xs:annotation>
<xs:documentation>CHANGED - Major Improvements
Expressions that return a Boolean value. Part of the IfThen type. If the "If" element is missing in an "IfThen" structure, its Boolean value defaults to "true", meaning that the "Then" part of the "IfThen" structure is automatically executed.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="PredicateType"> </xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ThenType">
<xs:annotation>
<xs:documentation>This type represents the "Then" and "Else" parts of an If-Then" statement. It can also be used to specify sequential actions after an event is fired in the form. It contains form-related actions and allows nested If-Then-Else structures to further define form actions.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="ExtensionBaseType">
<xs:group maxOccurs="unbounded" minOccurs="1" ref="ActionTypesGroup"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="IfThenType">
<xs:annotation>
<xs:documentation>This structure represents an If-Then-Else programming construct with unlimited If-Then-Else nesting. If the "If" element is missing, the "Then" part is executed, and the "Else" part (if present) is ignored.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="ExtensionBaseType">
<xs:sequence>
<xs:element name="If" type="PredicateType">
<xs:annotation>
<xs:documentation>*** TODO: Add choice with optional wrapper element that can be used to group predicate statements and combine with a Boolean operator.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Then" type="ThenType"> </xs:element>
<xs:element minOccurs="0" name="Else" type="ThenType"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="CaseBaseType">
<xs:complexContent>
<xs:extension base="IfThenType">
<xs:attribute form="unqualified" name="breakAfterCase" type="xs:boolean">
<xs:annotation>
<xs:documentation>Abort Case execution if the "If" part evaluates to true. Default is set in @defaultBreakAfterCase on the parent case block.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="CaseBlockType">
<xs:complexContent>
<xs:extension base="ExtensionBaseType">
<xs:sequence>
<xs:element name="Case" type="CaseBaseType" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute form="unqualified" name="defaultBreakAfterCase" type="xs:boolean" default="true">
<xs:annotation>
<xs:documentation>Abort Case execution if the "If" part evaluates to true. The default is true, meaning that the first If statement to evaluate to "true" will cause all subsequent Case sections to be skipped.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ForEachInList">
<xs:annotation>
<xs:documentation>Input a list, test each item against a Boolean filter, and return a new list. Side effects (such as actions) are allowed by using Then and Else blocks.
This type may be used as List input into expressions, and to generate side effects (actions) when iterating through a list.
The lists may be, e.g.,
All ListItems of a question
All (un) selected ListItems of a question
All repeat responses of a QF
All questions at a given repeat level
Sibs (all|prev|following) of the current item
To use the current item during a iteration use the variable $ITER
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="ReturnListType">
<xs:sequence>
<xs:element name="InputList" type="Any.Functions.ListType"/>
<xs:element name="Filter" type="ListFilterType"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ListFilterType">
<xs:annotation>
<xs:documentation>Determine if a supplied target value is between a min and a max values of a compatible datatype</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="ReturnBoolType">
<xs:sequence>
<xs:element name="IncludeIf" type="FilterPredicateType">
<xs:annotation>
<xs:documentation>Include in the returned List if the If block evaluates to true.
Optionally, Then or Else clause may be used in addition to retuning the new list.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="Then" type="ThenType"/>
<xs:element minOccurs="0" name="Else" type="ThenType"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="CompareToType">
<xs:complexContent>
<xs:extension base="ExtensionBaseType">
<xs:sequence>
<xs:element name="Expression" type="Any.Functions.AtomicType"/>
</xs:sequence>
<xs:attribute ref="CompareOpEnum"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="FilterPredicateType">
<xs:complexContent>
<xs:extension base="ReturnBoolType">
<xs:choice maxOccurs="unbounded">
<xs:element name="IsBetween" type="IsBetweenType"> </xs:element>
<xs:element name="InList" type="Any.Functions.ListType"/>
<xs:element name="CompareTo" type="CompareToType"> </xs:element>
<xs:element name="Predicate" type="PredicateType">
<xs:annotation>
<xs:documentation>Predicate may be used if a more complex test is desired. In priniciple, this test should depend on the current position of the iterator in the list. However, this dependency is not strictly required.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Group" type="FilterPredicateType"/>
</xs:choice>
<xs:attributeGroup ref="BoolAttributes"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="EventType">
<xs:complexContent>
<xs:extension base="ExtensionBaseType">
<xs:choice>
<xs:element name="Action">
<xs:complexType>
<xs:complexContent>
<xs:extension base="ExtensionBaseType">
<xs:group maxOccurs="unbounded" minOccurs="1" ref="ActionTypesGroup"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element maxOccurs="unbounded" name="CaseBlock" type="CaseBlockType"/>
<xs:element maxOccurs="unbounded" name="IfThenBlock" type="IfThenType"/>
</xs:choice>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="OnEventType">
<xs:annotation>
<xs:documentation>Add a custom event handler to a form item such as a question, section or list item.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="EventType">
<xs:attribute name="eventName" type="xs:string" use="required"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ActSetItemAttributeType">
<xs:annotation>
<xs:documentation>This type is used to act upon the value of common item attributes. If an "act" attribute (a type with the "act" prefix) has no value assigned, it is ignored. If it has a value, then that attribute on the target item(s) assume(s) that stated value when an attached Boolean condition evaluates to true. The attached condition may be an "If" statement or any expression that evaluates to a Boolean value.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="ExtensionBaseType">
<xs:attribute name="targetNames" type="xs:NMTOKENS" use="required">
<xs:annotation>
<xs:documentation>The names of the items affected by property actions</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="actVisible" type="xs:boolean"/>
<xs:attribute name="actEnable" type="xs:boolean"/>
<xs:attribute name="actMinCard" type="xs:nonNegativeInteger">
<xs:annotation>
<xs:documentation>Controls requirement to answer the question and the minimum number of repeats.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="actMaxCard" type="xs:nonNegativeInteger">
<xs:annotation>
<xs:documentation>Controls requirement to answer the question</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="actActivate" type="xs:boolean">
<xs:annotation>
<xs:documentation>Toggle visible and enabled together. Setting this to false will de-activate all descendents but will not change their enabled or visible properties.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="actSelect" type="xs:boolean">
<xs:annotation>
<xs:documentation>Toggle selection of a List Item; not applicable to other items.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="actDeleteResponse" type="xs:boolean">
<xs:annotation>
<xs:documentation>Delete any response in a Response field on a question or ListItem. Not applicable to other item types.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="actReadOnly" type="xs:boolean">