remove old readme
[atutor.git] / docs / mods / _core / imscp / imscp_v1p2_constraintsDocument.scmt
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <schema xmlns="http://www.ascc.net/xml/schematron">\r
3   <ns prefix="xs" uri="http://www.w3.org/2001/XMLSchema" />\r
4   <ns prefix="xsd" uri="http://www.w3.org/2001/XMLSchema" />\r
5   <ns prefix="xsi" uri="http://www.w3.org/2001/XMLSchema-instance" />\r
6   <ns prefix="ac" uri="http://iwm.uni-koblenz.de/xsd/tel_addc_v1p1" />\r
7   <ns prefix="ims" uri="http://www.imsglobal.org/xsd/imscc/imscp_v1p1" />\r
8   <!--***********************************************************************************************-->\r
9   <!--** Constraints document - this document holds Schematron rules that have been generated from **-->\r
10   <!--** AP condition and assertion elements. IMPORTANT: If this document exists, it MUST be       **-->\r
11   <!--** used in the validation of instances derived from the resultant schema - failure to do so  **-->\r
12   <!--** can result in an instance that does not conform to either the base schema or the          **-->\r
13   <!--** Application Profile.                                                                      **-->\r
14   <!--***********************************************************************************************-->\r
15 \r
16 \r
17   <pattern name="pattern_2">\r
18     <rule context="ims:organizations/ims:organization//ims:item">\r
19       <assert test="not(@isvisible='false') or count(./ims:item)=count(./ims:item[@isvisible='false'])">Assertion failed for pattern_2. If an item is invisible, its descendants must be invisible too.(#S02)</assert>\r
20     </rule>\r
21   </pattern>\r
22 \r
23   <pattern name="pattern_3">\r
24     <rule context="ims:manifest/ims:resources/ims:resource/ims:dependency">\r
25       <assert test="(not(../@type='associatedcontent/imscc_xmlv1p0/learning-application-resource')) or (current()/@identifierref = /ims:manifest/ims:resources/ims:resource[@type='webcontent']/@identifier)">Assertion failed for pattern_3. A Resource object which is a Learning Object associated resource may contain Dependency objects which reference Resource objects with Type 'webcontent'.(#S03)</assert>\r
26     </rule>\r
27   </pattern>\r
28 \r
29   <pattern name="pattern_4">\r
30     <rule context="ims:manifest/ims:organizations/ims:organization//ims:item">\r
31       <assert test="count(./@identifierref)=0 or count(./ims:item)=0">Assertion failed for pattern_4. An Item object which represents a folder is indicated by the absence of an IdentifierRef characteristic object. Folder Items support unlimited nesting of other folder Items and learning object link Items. Learning Application Resource Item objects may be nested by folder Item object but may not nest other folder or Learning Application resource Item objects.(#S04)</assert>\r
32     </rule>\r
33   </pattern>\r
34 \r
35   <pattern name="pattern_5">\r
36         <rule context="ims:manifest/ims:resources/ims:resource">\r
37                 <assert test="not((./@type='webcontent' or ./@type='associatedcontent/imscc_xmlv1p0/learning-application-resource') and ./@identifier = //ims:item/@identifierref) or count(./@href)=1">Error: Assertion failed for pattern_5: If a cartridge web content or associated content resource is linked from a Learning Application Object link Item object it must have an Href characteristic object which represents the launchable resource.(#S05)</assert>\r
38         </rule>\r
39   </pattern>\r
40 \r
41   <pattern name="pattern_6">\r
42     <rule context="ims:manifest/ims:resources/ims:resource">\r
43       <assert test="not(./@type='imsdt_xmlv1p0') or (count(./ims:file)= 1 and count(./@href)=0)">Error: Assertion failed for pattern_5: For Discussion Topic Resources the Resource object must contain a single File object which references the Discussion Topic descriptor XML file which conforms to the http://www.imsglobal.org/xsd/imsdt_v1p0 schema. Discussion Topic resources must not contain href (#S06)</assert>\r
44     </rule>\r
45   </pattern>\r
46 \r
47   <pattern name="pattern_7">\r
48     <rule context="ims:manifest/ims:resources/ims:resource">\r
49       <assert test="not(./@type='imswl_xmlv1p0') or (count(./ims:file) = 1 and count(./ims:dependency)=0 and count(./@href)=0)">Error: Assertion validation failed for pattern_7: For Web Link Resources the Resource object must contain a single File object which references the Web Link descriptor XML file which conforms to the http://www.imsglobal.org/xsd/imswl_v1p0 schema.It must contain neither Dependency objects nor an href attribute.(#S07)</assert>\r
50     </rule>\r
51   </pattern>\r
52 \r
53 <!-- Reference to SCORM removed\r
54   <pattern name="pattern_8">\r
55     <rule context="ims:manifest/ims:resources/ims:resource">\r
56       <assert test="not(./@type='imscc_xmlv1p0/scorm') or (count(./ims:file) = 1 and count(./ims:dependency)=0 and count(./@href)=0)">Error: Assertion validation failed for pattern_8:For SCORM resources the Resource object must contain a single File object which references the SCORM package interchange file.(#S08)</assert>\r
57     </rule>\r
58   </pattern>\r
59   -->\r
60 <!-- TI references removed\r
61   <pattern name="pattern_9">\r
62     <rule context="ims:manifest/ims:resources/ims:resource">\r
63       <assert test="not(./@type='imstiptdc_xmlv1p0') or (count(./ims:file) = 1 and count(./ims:dependency)=1 and count(./@href)=0)">Error: Assertion validation failed for pattern_9: For TI Deployment Context Resources the Resource object must contain a single File object which references the TI deployment context XML file. It must have a single dependency which references a Resource object with Type 'imstiptdd_xmlv1p0'. This represents the Tools Interoperabilty Deployment Descriptor.The TI Deployment Context Resource must not have any href attribute(#S09)</assert>\r
64     </rule>\r
65   </pattern>\r
66 \r
67 \r
68   <pattern name="pattern_10">\r
69     <rule context="ims:manifest/ims:resources/ims:resource">\r
70       <assert test="not(./@type='imstiptdd_xmlv1p0') or (count(./ims:file) = 1 and count(./ims:dependency)=0 and count(./@href)=0)">Error: Assertion validation failed for pattern_9: For Deployment Descriptor Resources the Resource object must contain a single File object which references the TI deployment descriptor XML file. This file must conform to the schema http://www.imsglobal.org/services/cc/imsti_ptdd_v1p0. The Deployment Descriptor Resource must have neither a dependency nor an href attribute.(#S10)</assert>\r
71     </rule>\r
72   </pattern>\r
73 -->\r
74 \r
75   <pattern name="pattern_11a">\r
76     <rule context="ims:manifest/ims:resources/ims:resource">\r
77       <assert test="not(./@type='imsqti_xmlv1p2/imscc_xmlv1p0/assessment') or (count(./ims:file) = 1 and count(./@href)=0)">Error: Assertion validation failed for pattern_11a: For Assessment resources the Resource object must contain a single File object which references the QTI XML file. This file must conform to the IMS CC profile of QTI 1.2.1. The profile is contained in the package of this profile as imscc_q*.zip. The derived schema of this QTI profile is in the package of this profile with the name ims_qtiasiv1p2_localised.xsd. The resource must not have an href attribute(#S11a)</assert>\r
78     </rule>\r
79   </pattern>\r
80 <!--\r
81         The following pattern has been broken up into pattern 11b1-11b4 for better readability of reports\r
82   <pattern name="pattern_11b">\r
83     <rule context="ims:manifest/ims:resources/ims:resource">\r
84       <assert test="not(./@type='imsqti_xmlv1p2/imscc_xmlv1p0/question-bank') or (count(./ims:file) = 1 and count(./@href)=0 and not(//ims:item[@identifierref]=./@identifier) and count(//ims:resource[@type='imsqti_xmlv1p2/imscc_xmlv1p0/question-bank'])=1)">Error: Assertion validation failed for pattern_11b: For Question Bank resources the Resource object must contain a single File object which references the QTI XML file. This file must conform to the IMS CC profile of QTI 1.2.1. The profile is contained in the package of this profile as imscc_q*.zip. The derived schema of this QTI profile is in the package of this profile with the name ims_qtiasiv1p2_localised.xsd. The resource must not have an href attribute. Moreover a Question Bank Resource must not be referenced from an item. There can be only one Questionbank Resource in a cartridge.(#S11b)</assert>\r
85     </rule>\r
86   </pattern>\r
87 -->\r
88   <pattern name="pattern_11b1">\r
89     <rule context="ims:manifest/ims:resources/ims:resource">\r
90       <assert test="not(./@type='imsqti_xmlv1p2/imscc_xmlv1p0/question-bank') or (count(./ims:file) = 1 )">Error: Assertion validation failed for pattern_11b1: For Question Bank resources the Resource object must contain a single File object which references the QTI XML file. (#S11b1)</assert>\r
91     </rule>\r
92   </pattern>\r
93 \r
94   <pattern name="pattern_11b2">\r
95     <rule context="ims:manifest/ims:resources/ims:resource">\r
96       <assert test="not(./@type='imsqti_xmlv1p2/imscc_xmlv1p0/question-bank') or (count(./@href)=0 )">Error: Assertion validation failed for pattern_11b2: A Question Bank Resource must not have an href attribute. (#S11b2)</assert>\r
97     </rule>\r
98   </pattern>\r
99 \r
100   <pattern name="pattern_11b3">\r
101     <rule context="ims:manifest/ims:resources/ims:resource">\r
102       <assert test="not(./@type='imsqti_xmlv1p2/imscc_xmlv1p0/question-bank') or ( not(//ims:item[@identifierref]=./@identifier) )">Error: Assertion validation failed for pattern_11b3:  A Question Bank Resource must not be referenced from an item. (#S11b3)</assert>\r
103     </rule>\r
104   </pattern>\r
105 \r
106   <pattern name="pattern_11b4">\r
107     <rule context="ims:manifest/ims:resources/ims:resource">\r
108       <assert test="not(./@type='imsqti_xmlv1p2/imscc_xmlv1p0/question-bank') or (count(//ims:resource[@type='imsqti_xmlv1p2/imscc_xmlv1p0/question-bank'])=1)">Error: Assertion validation failed for pattern_11b4: There can be only one Questionbank Resource in a cartridge.(#S11b4)</assert>\r
109     </rule>\r
110   </pattern>\r
111 \r
112   <pattern name="pattern_12">\r
113     <rule context="ims:manifest/ims:resources/ims:resource/ims:dependency">\r
114       <assert test="(not(../@type='imsdt_xmlv1p0')) or (current()/@identifierref = /ims:manifest/ims:resources/ims:resource[@type='webcontent']/@identifier) or (current()/@identifierref = /ims:manifest/ims:resources/ims:resource[@type='associatedcontent/imscc_xmlv1p0/learning-application-resource']/@identifier)">Assertion failed for pattern_12. A Resource object which is a Discussion Topic associated resource may contain Dependency objects which reference Resource objects with Type 'webcontent' or 'associatedcontent/imscc_xmlv1p0/learning-application-resource'.(#S12)</assert>\r
115     </rule>\r
116   </pattern>\r
117 \r
118 <!-- TI reference removed\r
119   <pattern name="pattern_13">\r
120     <rule context="ims:manifest/ims:resources/ims:resource/ims:dependency">\r
121       <assert test="(not(../@type='imstiptdc_xmlv1p0')) or (current()/@identifierref = /ims:manifest/ims:resources/ims:resource[@type='imstiptdd_xmlv1p0']/@identifier)">Assertion failed for pattern_13. A Resource object which is a Deployment Context may contain a single Dependency object which reference Resource objects which describe a Deployment descriptor.(#S13)</assert>\r
122     </rule>\r
123   </pattern>\r
124 -->\r
125 \r
126   <pattern name="pattern_14">\r
127     <rule context="ims:manifest/ims:resources/ims:resource/ims:dependency">\r
128       <assert test="(not(../@type='imsqti_xmlv1p2/imscc_xmlv1p0/assessment')) or (current()/@identifierref = /ims:manifest/ims:resources/ims:resource[@type='webcontent']/@identifier) or (current()/@identifierref = /ims:manifest/ims:resources/ims:resource[@type='associatedcontent/imscc_xmlv1p0/learning-application-resource']/@identifier)">Assertion failed for pattern_14. A Resource object which is an assessment may contain Dependency objects which reference Resource objects with Type 'webcontent' or 'associatedcontent/imscc_xmlv1p0/learning-application-resource'.(#S14)</assert>\r
129     </rule>\r
130   </pattern>\r
131 \r
132   <pattern name="pattern_15">\r
133     <rule context="ims:manifest/ims:resources/ims:resource/ims:dependency">\r
134       <assert test="(not(../@type='imsqti_xmlv1p2/imscc_xmlv1p0/question-bank')) or (current()/@identifierref = /ims:manifest/ims:resources/ims:resource[@type='webcontent']/@identifier) or (current()/@identifierref = /ims:manifest/ims:resources/ims:resource[@type='associatedcontent/imscc_xmlv1p0/learning-application-resource']/@identifier)">Assertion failed for pattern_15. A Resource object which is a Question Bank may contain Dependency objects which reference Resource objects with Type 'webcontent' or 'associatedcontent/imscc_xmlv1p0/learning-application-resource'.(#S15)</assert>\r
135     </rule>\r
136   </pattern>\r
137 \r
138   </schema>