|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | | -<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:proforma:v2.0.1" xmlns:tns="urn:proforma:v2.0.1" |
3 | | - elementFormDefault="qualified"> |
| 2 | +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:proforma:v2.1" xmlns:tns="urn:proforma:v2.1" elementFormDefault="qualified"> |
4 | 3 |
|
5 | 4 | <xs:element name="task" type="tns:task-type"> |
6 | 5 | <xs:key name="task-fileids"> |
|
113 | 112 | </xs:choice> |
114 | 113 | </xs:group> |
115 | 114 |
|
| 115 | + <xs:attributeGroup name="resource-properties"> |
| 116 | + <xs:attribute name="used-by-grader" type="xs:boolean" use="required"/> |
| 117 | + <xs:attribute name="visible" use="required"> |
| 118 | + <xs:simpleType> |
| 119 | + <xs:restriction base="xs:string"> |
| 120 | + <xs:enumeration value="yes"/> |
| 121 | + <xs:enumeration value="no"/> |
| 122 | + <xs:enumeration value="delayed"/> |
| 123 | + </xs:restriction> |
| 124 | + </xs:simpleType> |
| 125 | + </xs:attribute> |
| 126 | + <xs:attribute name="usage-by-lms" default="download"> |
| 127 | + <xs:simpleType> |
| 128 | + <xs:restriction base="xs:string"> |
| 129 | + <xs:enumeration value="edit"/> |
| 130 | + <xs:enumeration value="display"/> |
| 131 | + <xs:enumeration value="download"/> |
| 132 | + </xs:restriction> |
| 133 | + </xs:simpleType> |
| 134 | + </xs:attribute> |
| 135 | + </xs:attributeGroup> |
| 136 | + |
116 | 137 | <xs:complexType name="filerefs-type"> |
117 | 138 | <xs:sequence maxOccurs="unbounded"> |
118 | 139 | <xs:element name="fileref" type="tns:fileref-type"/> |
|
200 | 221 | <xs:element name="combine-ref" type="tns:grades-combine-ref-child-type"/> |
201 | 222 | </xs:choice> |
202 | 223 | </xs:sequence> |
203 | | - <xs:attribute name="id" type="xs:string" use="optional"> |
| 224 | + <xs:attribute name="id" type="xs:string"> |
204 | 225 | <xs:annotation> |
205 | 226 | <xs:documentation xml:lang="en">Node identifier. It is optional for the "root" node and required for "combine" |
206 | 227 | nodes. |
207 | 228 | </xs:documentation> |
208 | 229 | </xs:annotation> |
209 | 230 | </xs:attribute> |
210 | | - <xs:attribute name="function" use="optional" default="min"> |
| 231 | + <xs:attribute name="function" default="min"> |
211 | 232 | <xs:annotation> |
212 | 233 | <xs:documentation xml:lang="en">Accumulator function that is used to condense several sub results to a single |
213 | 234 | result. |
|
286 | 307 | </xs:element> |
287 | 308 | </xs:choice> |
288 | 309 | </xs:sequence> |
289 | | - <xs:attribute name="weight" type="xs:double" use="optional"> |
| 310 | + <xs:attribute name="weight" type="xs:double"> |
290 | 311 | <xs:annotation> |
291 | 312 | <xs:documentation xml:lang="en">Specifies a weight that is multiplied to the sub result of the pointed-at node |
292 | 313 | when flowing into the accumulator function. The pointed-at node is a test or a combine node. When calculating |
|
337 | 358 | <xs:documentation xml:lang="en">The id of the pointed-at test.</xs:documentation> |
338 | 359 | </xs:annotation> |
339 | 360 | </xs:attribute> |
340 | | - <xs:attribute name="sub-ref" type="xs:string" use="optional"> |
| 361 | + <xs:attribute name="sub-ref" type="xs:string"> |
341 | 362 | <xs:annotation> |
342 | 363 | <xs:documentation xml:lang="en">If the pointed at test exhibits sub test results, this points to one of the |
343 | 364 | sub results. Examples are individual test cases in a unit test specification, individual violation rules |
|
554 | 575 | <xs:documentation xml:lang="en">The id of the pointed-at test.</xs:documentation> |
555 | 576 | </xs:annotation> |
556 | 577 | </xs:attribute> |
557 | | - <xs:attribute name="sub-ref" type="xs:string" use="optional"> |
| 578 | + <xs:attribute name="sub-ref" type="xs:string"> |
558 | 579 | <xs:annotation> |
559 | 580 | <xs:documentation xml:lang="en">If the pointed at test exhibits sub test results, this points to one of the |
560 | 581 | sub results. Examples are individual test cases in a unit test specification, individual violation rules |
|
592 | 613 | <xs:element name="submission-restrictions" type="tns:submission-restrictions-type" minOccurs="0"/> |
593 | 614 | <xs:element name="files" type="tns:task-files-type"/> |
594 | 615 | <xs:element name="external-resources" type="tns:external-resources-type" minOccurs="0"/> |
595 | | - <xs:element name="model-solutions" type="tns:model-solutions-type"/> |
| 616 | + <xs:element name="model-solutions" type="tns:model-solutions-type" minOccurs="0"/> |
596 | 617 | <xs:element name="tests" type="tns:tests-type"/> |
597 | 618 | <xs:element name="grading-hints" type="tns:grading-hints-type" minOccurs="0"> |
598 | 619 | <xs:key name="task-gh-combineids"> |
|
607 | 628 | <xs:element name="meta-data" type="tns:task-meta-data-type"/> |
608 | 629 | </xs:sequence> |
609 | 630 | <xs:attribute name="uuid" type="xs:string" use="required"/> |
610 | | - <xs:attribute name="parent-uuid" type="xs:string" use="optional"/> |
| 631 | + <xs:attribute name="parent-uuid" type="xs:string"/> |
611 | 632 | <xs:attribute name="lang" type="xs:language"/> |
612 | 633 | </xs:complexType> |
613 | 634 |
|
614 | 635 | <xs:complexType name="submission-restrictions-type"> |
615 | | - <xs:sequence minOccurs="0" maxOccurs="unbounded"> |
616 | | - <xs:element name="file-restriction" type="tns:file-restr-type"/> |
| 636 | + <xs:sequence> |
| 637 | + <xs:element name="file-restriction" type="tns:file-restr-type" minOccurs="0" maxOccurs="unbounded"/> |
| 638 | + <xs:element name="description" type="tns:description-type" minOccurs="0"/> |
| 639 | + <xs:element name="internal-description" type="tns:description-type" minOccurs="0"/> |
617 | 640 | </xs:sequence> |
618 | | - <xs:attribute name="max-size" type="xs:positiveInteger" use="optional"/> |
| 641 | + <xs:attribute name="max-size" type="xs:positiveInteger"/> |
619 | 642 | </xs:complexType> |
620 | 643 |
|
621 | 644 | <xs:complexType name="file-restr-type"> |
622 | 645 | <xs:simpleContent> |
623 | 646 | <xs:extension base="xs:string"> |
624 | | - <xs:attribute name="required" type="xs:boolean" use="optional" default="true"/> |
625 | | - <xs:attribute name="pattern-format" use="optional" default="none"> |
| 647 | + <xs:attribute name="use" default="required"> |
| 648 | + <xs:simpleType> |
| 649 | + <xs:restriction base="xs:string"> |
| 650 | + <xs:enumeration value="required"/> |
| 651 | + <xs:enumeration value="optional"/> |
| 652 | + <xs:enumeration value="prohibited"/> |
| 653 | + </xs:restriction> |
| 654 | + </xs:simpleType> |
| 655 | + </xs:attribute> |
| 656 | + <xs:attribute name="pattern-format" default="none"> |
626 | 657 | <xs:simpleType> |
627 | 658 | <xs:restriction base="xs:string"> |
628 | 659 | <xs:enumeration value="none"/> |
629 | 660 | <xs:enumeration value="posix-ere"/> |
630 | 661 | </xs:restriction> |
631 | 662 | </xs:simpleType> |
632 | | - </xs:attribute> |
| 663 | + </xs:attribute> |
633 | 664 | </xs:extension> |
634 | 665 | </xs:simpleContent> |
635 | 666 | </xs:complexType> |
|
663 | 694 | A list of existing programming languages is |
664 | 695 | available in the white paper appendix. |
665 | 696 | </xs:documentation> |
666 | | - </xs:annotation> |
667 | | - <xs:attribute name="version" type="xs:string" use="required"/> |
| 697 | + </xs:annotation> |
| 698 | + <xs:attribute name="version" type="xs:string" use="required"/> |
668 | 699 | </xs:extension> |
669 | 700 | </xs:simpleContent> |
670 | 701 | </xs:complexType> |
|
675 | 706 | <xs:element name="internal-description" type="tns:description-type" minOccurs="0"/> |
676 | 707 | </xs:sequence> |
677 | 708 | <xs:attribute name="id" type="xs:string" use="required"/> |
678 | | - <xs:attribute name="mimetype" type="xs:string" use="optional"/> |
679 | | - <xs:attribute name="used-by-grader" type="xs:boolean" use="required"/> |
680 | | - <xs:attribute name="visible" use="required"> |
681 | | - <xs:simpleType> |
682 | | - <xs:restriction base="xs:string"> |
683 | | - <xs:enumeration value="yes"/> |
684 | | - <xs:enumeration value="no"/> |
685 | | - <xs:enumeration value="delayed"/> |
686 | | - </xs:restriction> |
687 | | - </xs:simpleType> |
688 | | - </xs:attribute> |
689 | | - <xs:attribute name="usage-by-lms" use="optional" default="download"> |
690 | | - <xs:simpleType> |
691 | | - <xs:restriction base="xs:string"> |
692 | | - <xs:enumeration value="edit"/> |
693 | | - <xs:enumeration value="display"/> |
694 | | - <xs:enumeration value="download"/> |
695 | | - </xs:restriction> |
696 | | - </xs:simpleType> |
697 | | - </xs:attribute> |
| 709 | + <xs:attribute name="mimetype" type="xs:string"/> |
| 710 | + <xs:attributeGroup ref="tns:resource-properties"/> |
698 | 711 | </xs:complexType> |
699 | 712 |
|
700 | 713 | <xs:complexType name="task-files-type"> |
|
715 | 728 | <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax"/> |
716 | 729 | </xs:sequence> |
717 | 730 | <xs:attribute name="id" type="xs:string" use="required"/> |
718 | | - <xs:attribute name="reference" type="xs:string" use="optional"/> |
| 731 | + <xs:attribute name="reference" type="xs:string"/> |
| 732 | + <xs:attributeGroup ref="tns:resource-properties"/> |
719 | 733 | </xs:complexType> |
720 | 734 |
|
721 | 735 | <xs:simpleType name="title-type"> |
|
762 | 776 | <xs:element name="test-configuration" type="tns:test-configuration-type"/> |
763 | 777 | </xs:sequence> |
764 | 778 | <xs:attribute name="id" type="xs:string" use="required"/> |
765 | | - <xs:attribute name="validity" use="optional" default="1.00"> |
| 779 | + <xs:attribute name="validity" default="1.00"> |
766 | 780 | <xs:simpleType> |
767 | 781 | <xs:restriction base="xs:decimal"> |
768 | 782 | <xs:totalDigits value="3"/> |
|
817 | 831 | <xs:element name="lms" type="tns:lms-type" minOccurs="0"/> |
818 | 832 | <xs:element name="result-spec" type="tns:result-spec-type"/> |
819 | 833 | </xs:sequence> |
| 834 | + <xs:attribute name="id" type="xs:string"/> |
820 | 835 | </xs:complexType> |
821 | 836 |
|
822 | 837 | <xs:complexType name="submission-file-type"> |
823 | 838 | <xs:group ref="tns:file-choice-group"/> |
824 | | - <xs:attribute name="id" type="xs:string" use="optional"/> |
825 | | - <xs:attribute name="mimetype" type="xs:string" use="optional"/> |
| 839 | + <xs:attribute name="id" type="xs:string"/> |
| 840 | + <xs:attribute name="mimetype" type="xs:string"/> |
826 | 841 | </xs:complexType> |
827 | 842 |
|
828 | 843 | <xs:complexType name="submission-files-type"> |
|
832 | 847 | </xs:complexType> |
833 | 848 |
|
834 | 849 | <xs:complexType name="external-task-type"> |
835 | | - <xs:simpleContent> |
836 | | - <xs:extension base="xs:string"> |
837 | | - <xs:attribute name="uuid" type="xs:string" use="optional"/> |
838 | | - </xs:extension> |
839 | | - </xs:simpleContent> |
| 850 | + <xs:sequence> |
| 851 | + <xs:element name="uri" type="xs:string" minOccurs="0"/> |
| 852 | + <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax"/> |
| 853 | + </xs:sequence> |
| 854 | + <xs:attribute name="uuid" type="xs:string"/> |
840 | 855 | </xs:complexType> |
841 | 856 |
|
842 | | - <xs:simpleType name="external-submission-type"> |
843 | | - <xs:restriction base="xs:string"/> |
844 | | - </xs:simpleType> |
| 857 | + <xs:complexType name="external-submission-type"> |
| 858 | + <xs:sequence> |
| 859 | + <xs:element name="uri" type="xs:string" minOccurs="0"/> |
| 860 | + <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax"/> |
| 861 | + </xs:sequence> |
| 862 | + </xs:complexType> |
845 | 863 |
|
846 | 864 | <xs:complexType name="included-task-file-type"> |
847 | 865 | <xs:choice> |
848 | 866 | <xs:element name="embedded-zip-file" type="tns:embedded-bin-file-type"/> |
| 867 | + <xs:element name="embedded-xml-file" type="tns:embedded-bin-file-type"/> |
849 | 868 | <xs:element name="attached-zip-file" type="tns:attached-bin-file-type"/> |
850 | 869 | <xs:element name="attached-xml-file" type="tns:attached-txt-file-type"/> |
851 | 870 | </xs:choice> |
852 | | - <xs:attribute name="uuid" type="xs:string" use="optional"/> |
| 871 | + <xs:attribute name="uuid" type="xs:string"/> |
853 | 872 | </xs:complexType> |
854 | 873 |
|
855 | 874 | <xs:complexType name="lms-type"> |
|
860 | 879 | <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded" |
861 | 880 | processContents="lax"/> |
862 | 881 | </xs:sequence> |
863 | | - <xs:attribute name="url" type="xs:string" use="optional"/> |
| 882 | + <xs:attribute name="url" type="xs:string"/> |
864 | 883 | </xs:complexType> |
865 | 884 |
|
866 | 885 | <xs:complexType name="result-spec-type"> |
|
906 | 925 | <xs:element name="response-meta-data" type="tns:response-meta-data-type"/> |
907 | 926 | </xs:sequence> |
908 | 927 | <xs:attribute name="lang" type="xs:language"/> |
| 928 | + <xs:attribute name="submission-id" type="xs:string"/> |
909 | 929 | </xs:complexType> |
910 | 930 |
|
911 | 931 | <xs:complexType name="response-meta-data-type"> |
912 | 932 | <xs:sequence> |
| 933 | + <xs:element name="response-datetime" minOccurs="0" type="xs:dateTime"/> |
913 | 934 | <xs:element name="grader-engine" type="tns:grader-engine-type"/> |
914 | 935 | <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax"/> |
915 | 936 | </xs:sequence> |
|
1043 | 1064 | </xs:complexType> |
1044 | 1065 | </xs:element> |
1045 | 1066 | <xs:element name="filerefs" type="tns:filerefs-type" minOccurs="0"/> |
| 1067 | + <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax"/> |
1046 | 1068 | </xs:sequence> |
1047 | 1069 | <xs:attribute name="level" type="tns:feedback-level-type"/> |
1048 | 1070 | </xs:complexType> |
1049 | 1071 |
|
1050 | 1072 | <xs:complexType name="response-file-type"> |
1051 | 1073 | <xs:group ref="tns:file-choice-group"/> |
1052 | 1074 | <xs:attribute name="id" type="xs:string" use="required"/> |
1053 | | - <xs:attribute name="mimetype" type="xs:string" use="optional"/> |
| 1075 | + <xs:attribute name="mimetype" type="xs:string"/> |
1054 | 1076 | <xs:attribute name="title" type="xs:string" use="required"/> |
1055 | 1077 | </xs:complexType> |
1056 | 1078 |
|
|
0 commit comments