remove old readme
[atutor.git] / mods / _core / imscp / include / imscp_rootv1p1p2.xsd
1 <?xml version="1.0"?>
2
3 <!-- edited with XML Spy v3.5 (http://www.xmlspy.com) by Thomas Wason (private) -->
4 <!-- filename=ims_cp_rootv1p1p2.xsd -->
5 <!-- Copyright (2) 2001 IMS Global Learning Consortium, Inc. -->
6 <!-- edited by Thomas Wason  -->
7 <!-- Conforms to w3c http://www.w3.org/TR/xmlschema-1/ 2000-10-24-->
8
9 <xsd:schema xmlns="http://www.imsproject.org/xsd/imscp_rootv1p1p2" 
10             targetNamespace="http://www.imsproject.org/xsd/imscp_rootv1p1p2" 
11             xmlns:xml="http://www.w3.org/XML/1998/namespace" 
12             xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
13             elementFormDefault="unqualified" version="IMS CP 1.1.2">
14
15    <!-- ******************** -->
16    <!-- ** Change History ** -->
17    <!-- ******************** -->
18    <xsd:annotation>
19       <xsd:documentation xml:lang="en">DRAFT XSD for IMS Content Packaging version 1.1 DRAFT</xsd:documentation>
20       <xsd:documentation> Copyright (c) 2001 IMS GLC, Inc. </xsd:documentation>
21       <xsd:documentation>2000-04-21, Adjustments by T.D. Wason from CP 1.0.</xsd:documentation>
22       <xsd:documentation>2001-02-22, T.D.Wason: Modify for 2000-10-24 XML-Schema version.  Modified to support extension.</xsd:documentation>
23       <xsd:documentation>2001-03-12, T.D.Wason: Change filename, target and meta-data namespaces and meta-data fielname.  Add meta-data to itemType, fileType and organizationType.</xsd:documentation>
24       <xsd:documentation>Do not define namespaces for xml in XML instances generated from this xsd.</xsd:documentation>
25       <xsd:documentation>Imports IMS meta-data xsd, lower case element names.         </xsd:documentation>
26       <xsd:documentation>This XSD provides a reference to the IMS meta-data root element as imsmd:record</xsd:documentation>
27       <xsd:documentation>If the IMS meta-data is to be used in the XML instance then the instance must define an IMS meta-data prefix with a namespace.  The meta-data targetNamespace should be used.  </xsd:documentation>
28       <xsd:documentation>2001-03-20, Thor Anderson: Remove manifestref, change resourceref back to identifierref, change manifest back to contained by manifest. --Tom Wason: manifest may contain _none_ or more manifests.</xsd:documentation>
29       <xsd:documentation>2001-04-13 Tom Wason: corrected attirbute name structure.  Was misnamed type.  </xsd:documentation>
30       <xsd:documentation>2001-05-14 Schawn Thropp: Made all complexType extensible with the group.any</xsd:documentation>
31       <xsd:documentation>Added the anyAttribute to all complexTypes. Changed the href attribute on the fileType and resourceType to xsd:string</xsd:documentation>
32       <xsd:documentation>Changed the maxLength of the href, identifierref, parameters, structure attributes to match the Information model.</xsd:documentation>
33       <xsd:documentation>2001-07-25 Schawn Thropp: Changed the namespace for the Schema of Schemas to the 5/2/2001 W3C XML Schema</xsd:documentation> 
34       <xsd:documentation>Recommendation. attributeGroup attr.imsmd deleted, was not used anywhere.  Any attribute declarations that have</xsd:documentation>
35       <xsd:documentation>use = "default" changed to use="optional" - attr.structure.req.</xsd:documentation>
36       <xsd:documentation>Any attribute declarations that have value="somevalue" changed to default="somevalue",</xsd:documentation>
37       <xsd:documentation>attr.structure.req (hierarchical).  Removed references to IMS MD Version 1.1.</xsd:documentation>
38       <xsd:documentation>Modified attribute group "attr.resourcetype.req" to change use from optional</xsd:documentation>
39       <xsd:documentation>to required to match the information model.  As a result the default value also needed to be removed</xsd:documentation> 
40       <xsd:documentation>Name change for XSD.  Changed to match version of CP Spec                                           </xsd:documentation> 
41    </xsd:annotation>
42
43    <xsd:annotation>
44       <xsd:documentation>Inclusions and Imports</xsd:documentation>
45    </xsd:annotation>
46
47    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="ims_xml.xsd"/>
48
49    <xsd:annotation>
50       <xsd:documentation>Attribute Declarations</xsd:documentation>
51    </xsd:annotation>
52
53    <!-- **************************** -->
54    <!-- ** Attribute Declarations ** -->
55    <!-- **************************** -->
56    <xsd:attributeGroup name="attr.base">
57       <xsd:attribute ref="xml:base" use="optional"/>
58    </xsd:attributeGroup>
59
60    <xsd:attributeGroup name="attr.default">
61       <xsd:attribute name="default" type="xsd:IDREF" use="optional"/>
62    </xsd:attributeGroup>
63
64    <xsd:attributeGroup name="attr.href">
65       <xsd:attribute name="href" use="optional">
66          <xsd:simpleType>
67             <xsd:restriction base="xsd:anyURI">
68                <xsd:maxLength value="2000"/>
69             </xsd:restriction>
70          </xsd:simpleType>
71       </xsd:attribute>
72    </xsd:attributeGroup>
73
74    <xsd:attributeGroup name="attr.href.req">
75       <xsd:attribute name="href" use="required">
76          <xsd:simpleType>
77             <xsd:restriction base="xsd:anyURI">
78                <xsd:maxLength value="2000"/>
79             </xsd:restriction>
80          </xsd:simpleType>
81       </xsd:attribute>
82    </xsd:attributeGroup> 
83
84    <xsd:attributeGroup name="attr.identifier.req">
85       <xsd:attribute name="identifier" type="xsd:ID" use="required"/>
86    </xsd:attributeGroup>
87
88    <xsd:attributeGroup name="attr.identifier">
89       <xsd:attribute name="identifier" type="xsd:ID" use="optional"/>
90    </xsd:attributeGroup>
91
92    <xsd:attributeGroup name="attr.isvisible">
93       <xsd:attribute name="isvisible" type="xsd:boolean" use="optional"/>
94    </xsd:attributeGroup>
95    
96    <xsd:attributeGroup name="attr.parameters">
97       <xsd:attribute name="parameters" use="optional">
98          <xsd:simpleType>
99             <xsd:restriction base="xsd:string">
100                <xsd:maxLength value="1000"/>
101             </xsd:restriction>
102          </xsd:simpleType>
103       </xsd:attribute>
104    </xsd:attributeGroup>
105    
106    <xsd:attributeGroup name="attr.identifierref">
107       <xsd:attribute name="identifierref" use="optional">
108          <xsd:simpleType>
109             <xsd:restriction base="xsd:string">
110                <xsd:maxLength value="2000"/>
111             </xsd:restriction>
112          </xsd:simpleType>
113       </xsd:attribute>
114    </xsd:attributeGroup>
115    
116    <xsd:attributeGroup name="attr.identifierref.req">
117       <xsd:attribute name="identifierref" use="required">
118          <xsd:simpleType>
119             <xsd:restriction base="xsd:string">
120                <xsd:maxLength value="2000"/>
121             </xsd:restriction>
122          </xsd:simpleType>
123       </xsd:attribute>
124    </xsd:attributeGroup>
125                 
126    <xsd:attributeGroup name="attr.resourcetype.req">
127       <xsd:attribute name="type" use="required">
128          <xsd:simpleType>
129             <xsd:restriction base="xsd:string">
130                <xsd:maxLength value="1000"/>
131             </xsd:restriction>
132          </xsd:simpleType>
133       </xsd:attribute>
134    </xsd:attributeGroup>
135
136    <xsd:attributeGroup name="attr.structure.req">
137       <xsd:attribute name="structure" use="optional" default="hierarchical">
138          <xsd:simpleType>
139             <xsd:restriction base="xsd:string">
140                <xsd:maxLength value="200"/>
141             </xsd:restriction>
142          </xsd:simpleType>
143       </xsd:attribute>
144    </xsd:attributeGroup>
145
146    <xsd:attributeGroup name="attr.version">
147       <xsd:attribute name="version" use="optional">
148          <xsd:simpleType>
149             <xsd:restriction base="xsd:string">
150                <xsd:maxLength value="20"/>
151             </xsd:restriction>
152          </xsd:simpleType>
153       </xsd:attribute>
154    </xsd:attributeGroup>
155
156    <xsd:annotation>
157        <xsd:documentation>element groups</xsd:documentation>
158    </xsd:annotation>
159
160    <xsd:group name="grp.any">
161       <xsd:annotation>
162          <xsd:documentation>Any namespaced element from any namespace may be included within an &quot;any&quot; element.  The namespace for the imported element must be defined in the instance, and the schema must be imported.  </xsd:documentation>
163       </xsd:annotation>
164       <xsd:sequence>
165          <xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>
166       </xsd:sequence>
167    </xsd:group>
168
169    <!-- ************************** -->
170    <!-- ** Element Declarations ** -->
171    <!-- ************************** -->
172
173    <xsd:element name="dependency" type="dependencyType"/>
174    <xsd:element name="file" type="fileType"/>
175    <xsd:element name="item" type="itemType"/>
176    <xsd:element name="manifest" type="manifestType"/>
177    <xsd:element name="metadata" type="metadataType"/>
178    <xsd:element name="organization" type="organizationType"/>
179    <xsd:element name="organizations" type="organizationsType"/>
180    <xsd:element name="resource" type="resourceType"/>
181    <xsd:element name="resources" type="resourcesType"/>
182    <xsd:element name="schema" type="schemaType"/>
183    <xsd:element name="schemaversion" type="schemaversionType"/>
184    <xsd:element name="title" type="titleType"/>
185
186    <!-- ******************* -->
187    <!-- ** Complex Types ** -->
188    <!-- ******************* -->
189
190    <!-- **************** -->
191    <!-- ** dependency ** -->
192    <!-- **************** -->
193    <xsd:complexType name="dependencyType">
194       <xsd:sequence>
195          <xsd:group ref="grp.any"/>
196       </xsd:sequence>
197       <xsd:attributeGroup ref="attr.identifierref.req"/>
198       <xsd:anyAttribute namespace="##other" processContents="strict"/>
199    </xsd:complexType>
200    
201    <!-- ********** -->
202    <!-- ** file ** -->
203    <!-- ********** -->
204    <xsd:complexType name="fileType">
205       <xsd:sequence>
206          <xsd:element ref="metadata" minOccurs="0"/>
207          <xsd:group ref="grp.any"/>
208       </xsd:sequence>
209       <xsd:attributeGroup ref="attr.href.req"/>
210       <xsd:anyAttribute namespace="##other" processContents="strict"/>
211    </xsd:complexType>
212    
213    <!-- ********** -->
214    <!-- ** item ** -->
215    <!-- ********** -->
216    <xsd:complexType name="itemType">
217       <xsd:sequence>
218          <xsd:element ref="title" minOccurs="0"/>
219          <xsd:element ref="item" minOccurs="0" maxOccurs="unbounded"/>
220          <xsd:element ref="metadata" minOccurs="0"/>
221          <xsd:group ref="grp.any"/>
222       </xsd:sequence>
223       <xsd:attributeGroup ref="attr.identifier.req"/>
224       <xsd:attributeGroup ref="attr.identifierref"/>
225       <xsd:attributeGroup ref="attr.isvisible"/>
226       <xsd:attributeGroup ref="attr.parameters"/>
227       <xsd:anyAttribute namespace="##other" processContents="strict"/>
228    </xsd:complexType>
229    
230    <!-- ************** -->
231    <!-- ** manifest ** -->
232    <!-- ************** -->
233    <xsd:complexType name="manifestType">
234       <xsd:sequence>
235          <xsd:element ref="metadata" minOccurs="0"/>
236          <xsd:element ref="organizations"/>
237          <xsd:element ref="resources"/>
238          <xsd:element ref="manifest" minOccurs="0" maxOccurs="unbounded"/>
239          <xsd:group ref="grp.any"/>
240       </xsd:sequence>
241       <xsd:attributeGroup ref="attr.identifier.req"/>
242       <xsd:attributeGroup ref="attr.version"/>
243       <xsd:attribute ref="xml:base"/>
244       <xsd:anyAttribute namespace="##other" processContents="strict"/>
245    </xsd:complexType>
246    
247    <!-- ************** -->
248    <!-- ** metadata ** -->
249    <!-- ************** -->
250    <xsd:complexType name="metadataType">
251       <xsd:sequence>
252          <xsd:element ref="schema" minOccurs="0"/>
253          <xsd:element ref="schemaversion" minOccurs="0"/>
254          <xsd:group ref="grp.any"/>
255       </xsd:sequence>
256    </xsd:complexType>
257    
258    <!-- ******************* -->
259    <!-- ** organizations ** -->
260    <!-- ******************* -->
261    <xsd:complexType name="organizationsType">
262       <xsd:sequence>
263          <xsd:element ref="organization" minOccurs="0" maxOccurs="unbounded"/>
264          <xsd:group ref="grp.any"/>
265       </xsd:sequence>
266       <xsd:attributeGroup ref="attr.default"/>
267       <xsd:anyAttribute namespace="##other" processContents="strict"/>
268    </xsd:complexType>
269    
270    <!-- ****************** -->
271    <!-- ** organization ** -->
272    <!-- ****************** -->
273    <xsd:complexType name="organizationType">
274       <xsd:sequence>
275          <xsd:element ref="title" minOccurs="0"/>
276          <xsd:element ref="item" minOccurs="0" maxOccurs="unbounded"/>
277          <xsd:element ref="metadata" minOccurs="0"/>
278          <xsd:group ref="grp.any"/>
279       </xsd:sequence>
280       <xsd:attributeGroup ref="attr.identifier.req"/>
281       <xsd:attributeGroup ref="attr.structure.req"/>
282       <xsd:anyAttribute namespace="##other" processContents="strict"/>
283    </xsd:complexType>
284    
285    <!-- *************** -->
286    <!-- ** resources ** -->
287    <!-- *************** -->
288    <xsd:complexType name="resourcesType">
289       <xsd:sequence>
290           <xsd:element ref="resource" minOccurs="0" maxOccurs="unbounded"/>
291           <xsd:group ref="grp.any"/>
292       </xsd:sequence>
293       <xsd:attributeGroup ref="attr.base"/>
294       <xsd:anyAttribute namespace="##other" processContents="strict"/>
295    </xsd:complexType>
296    
297    <!-- ************** -->
298    <!-- ** resource ** -->
299    <!-- ************** -->
300    <xsd:complexType name="resourceType">
301       <xsd:sequence>
302          <xsd:element ref="metadata" minOccurs="0"/>
303          <xsd:element ref="file" minOccurs="0" maxOccurs="unbounded"/>
304          <xsd:element ref="dependency" minOccurs="0" maxOccurs="unbounded"/>
305          <xsd:group ref="grp.any"/>
306       </xsd:sequence>
307       <xsd:attributeGroup ref="attr.identifier.req"/>
308       <xsd:attributeGroup ref="attr.resourcetype.req"/>
309       <xsd:attributeGroup ref="attr.base"/>
310       <xsd:attributeGroup ref="attr.href"/>
311       <xsd:anyAttribute namespace="##other" processContents="strict"/>
312    </xsd:complexType>
313
314    <!-- ****************** -->
315    <!-- ** Simple Types ** -->
316    <!-- ****************** -->
317
318    <!-- ************ -->
319    <!-- ** schema ** -->
320    <!-- ************ -->
321    <xsd:simpleType name="schemaType">
322       <xsd:restriction base="xsd:string">
323          <xsd:maxLength value="100"/>
324       </xsd:restriction>
325    </xsd:simpleType>
326    
327    <!-- ******************* -->
328    <!-- ** schemaversion ** -->
329    <!-- ******************* -->
330    <xsd:simpleType name="schemaversionType">
331       <xsd:restriction base="xsd:string">
332          <xsd:maxLength value="20"/>
333       </xsd:restriction>
334    </xsd:simpleType>
335    
336    <!-- *********** -->
337    <!-- ** title ** -->
338    <!-- *********** -->
339    <xsd:simpleType name="titleType">
340       <xsd:restriction base="xsd:string">
341          <xsd:maxLength value="200"/>
342       </xsd:restriction>
343    </xsd:simpleType>
344
345 </xsd:schema>