Actualización

This commit is contained in:
Xes
2025-04-10 12:49:05 +02:00
parent 4aff98e77b
commit 1cdd00920f
9151 changed files with 1800913 additions and 0 deletions

View File

@@ -0,0 +1,110 @@
<?xml version="1.0"?>
<!-- filename=adlcp_rootv1p2.xsd -->
<!-- Conforms to w3c http://www.w3.org/TR/xmlschema-1/ 2000-10-24-->
<xsd:schema xmlns="http://www.adlnet.org/xsd/adlcp_rootv1p2"
targetNamespace="http://www.adlnet.org/xsd/adlcp_rootv1p2"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
xmlns:imscp="http://www.imsproject.org/xsd/imscp_rootv1p1p2"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="unqualified"
version="ADL Version 1.2">
<xsd:import namespace="http://www.imsproject.org/xsd/imscp_rootv1p1p2"
schemaLocation="imscp_rootv1p1p2.xsd"/>
<xsd:element name="location" type="locationType"/>
<xsd:element name="prerequisites" type="prerequisitesType"/>
<xsd:element name="maxtimeallowed" type="maxtimeallowedType"/>
<xsd:element name="timelimitaction" type="timelimitactionType"/>
<xsd:element name="datafromlms" type="datafromlmsType"/>
<xsd:element name="masteryscore" type="masteryscoreType"/>
<xsd:element name="schema" type="newSchemaType"/>
<xsd:simpleType name="newSchemaType">
<xsd:restriction base="imscp:schemaType">
<xsd:enumeration value="ADL SCORM"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:element name="schemaversion" type="newSchemaversionType"/>
<xsd:simpleType name="newSchemaversionType">
<xsd:restriction base="imscp:schemaversionType">
<xsd:enumeration value="1.2"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:attribute name="scormtype">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="asset"/>
<xsd:enumeration value="sco"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
<xsd:simpleType name="locationType">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="2000"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="prerequisitesType">
<xsd:simpleContent>
<xsd:extension base="prerequisiteStringType">
<xsd:attributeGroup ref="attr.prerequisitetype"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:attributeGroup name="attr.prerequisitetype">
<xsd:attribute name="type" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="aicc_script"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:attributeGroup>
<xsd:simpleType name="maxtimeallowedType">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="13"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="timelimitactionType">
<xsd:restriction base="stringType">
<xsd:enumeration value="exit,no message"/>
<xsd:enumeration value="exit,message"/>
<xsd:enumeration value="continue,no message"/>
<xsd:enumeration value="continue,message"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="datafromlmsType">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="255"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="masteryscoreType">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="200"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="stringType">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="prerequisiteStringType">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="200"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>

View File

@@ -0,0 +1,714 @@
/**
* Wrapper to the SCORM API provided by Chamilo
* The complete set of functions and variables are in this file to avoid unnecessary file
* accesses.
* Only event triggers and answer data are inserted into the final document.
* @author Yannick Warnier - inspired by the ADLNet documentation on SCORM content-side API
* @package scorm.js
*/
/**
* Initialisation of the SCORM API section.
* Find the SCO functions (startTimer, computeTime, etc in the second section)
* Find the Chamilo-proper functions (checkAnswers, etc in the third section)
*/
var _debug = true;
var findAPITries = 0;
var _apiHandle = null; //private variable
var errMsgLocate = "Unable to locate the LMS's API implementation";
var _NoError = 0;
var _GeneralException = 101;
var _ServerBusy = 102;
var _InvalidArgumentError = 201;
var _ElementCannotHaveChildren = 202;
var _ElementIsNotAnArray = 203;
var _NotInitialized = 301;
var _NotImplementedError = 401;
var _InvalidSetValue = 402;
var _ElementIsReadOnly = 403;
var _ElementIsWriteOnly = 404;
var _IncorrectDataType = 405;
var startTime;
var exitPageStatus;
/**
* Gets the API handle right into the local API object and ensure there is only one.
* Using the singleton pattern to ensure there's only one API object.
* @return object The API object as given by the LMS
*/
var API = new function()
{
if (_apiHandle == null) {
_apiHandle = getAPI();
}
return _apiHandle;
}
/**
* Finds the API on the LMS side or gives up giving an error message
* @param object The window/frame object in which we are searching for the SCORM API
* @return object The API object recovered from the LMS's implementation of the SCORM API
*/
function findAPI(win)
{
while((win.API == null) && (win.parent != null) && (win.parent != win)) {
findAPITries++;
if (findAPITries>10) {
alert("Error finding API - too deeply nested");
return null;
}
win = win.parent
}
return win.API;
}
/**
* Gets the API from the current window/frame or from parent objects if not found
* @return object The API object recovered from the LMS's implementation of the SCORM API
*/
function getAPI()
{
//window is the global/root object of the current window/frame
var MyAPI = findAPI(window);
//look through parents if any
if ((MyAPI == null) && (window.opener != null) && (typeof(window.opener) != "undefined")) {
MyAPI = findAPI(window.opener);
}
//still not found? error message
if (MyAPI == null) {
alert("Unable to find SCORM API adapter.\nPlease check your LMS is considering this page as SCORM and providing the right JavaScript interface.")
}
return MyAPI;
}
/**
* Handles error codes (prints the error if it has a description)
* @return int Error code from LMS's API
*/
function errorHandler()
{
if (API == null) {
alert("Unable to locate the LMS's API. Cannot determine LMS error code");
return;
}
var errCode = API.LMSGetLastError().toString();
if (errCode != _NoError) {
if (errCode == _NotImplementedError) {
var errDescription = "The LMS doesn't support this feature";
if (_debug) {
errDescription += "\n";
errDescription += api.LMSGetDiagnostic(null);
}
addDebug(errDescription);
} else {
var errDescription = API.LMSGetErrorString(errCode);
if (_debug) {
errDescription += "\n";
errDescription += api.LMSGetDiagnostic(null);
}
addDebug(errDescription);
}
}
return errCode;
}
function addDebug(message) {
if (_debug && window.console) {
console.log(message);
}
}
function addDebugTable(message) {
if (_debug && window.console) {
console.table(message);
}
}
/**
* Calls the LMSInitialize method of the LMS's API object
* @return string The string value of the LMS returned value or false if error (should be "true" otherwise)
*/
function doLMSInitialize()
{
if (API == null) {
alert(errMsgLocate + "\nLMSInitialize failed");
return false;
}
var result = API.LMSInitialize("");
if (result.toString() != "true") {
var err = errorHandler();
}
return result.toString();
}
/**
* Calls the LMSFinish method of the LMS's API object
* @return string The string value of the LMS return value, or false if error (should be "true" otherwise)
*/
function doLMSFinish()
{
if (API == null) {
alert(errMsgLocate + "\nLMSFinish failed");
return false;
} else {
var result = API.LMSFinish('');
if (result.toString() != "true") {
var err = errorHandler();
}
}
return result.toString();
}
/**
* Calls the LMSGetValue method
* @param string The name of the SCORM parameter to get
* @return string The value returned by the LMS
*/
function doLMSGetValue(name)
{
if (API == null) {
alert(errMsgLocate + "\nLMSGetValue was not successful.");
return '';
} else {
var value = API.LMSGetValue(name);
var errCode = API.LMSGetLastError().toString();
if (errCode != _NoError) {
// an error was encountered so display the error description
var errDescription = API.LMSGetErrorString(errCode);
addDebug("LMSGetValue(" + name + ") failed. \n" + errDescription)
return '';
}
return value.toString();
}
}
/**
* Calls the LMSSetValue method of the API object
* @param string The name of the SCORM parameter to set
* @param string The value to set the parameter to
* @return void
*/
function doLMSSetValue(name, value)
{
if (API == null) {
alert("Unable to locate the LMS's API Implementation.\nLMSSetValue was not successful.");
return;
} else {
var result = API.LMSSetValue(name, value);
if (result.toString() != "true") {
var err = errorHandler();
}
}
return;
}
/**
* Calls the LMSCommit method
*/
function doLMSCommit()
{
if (API == null) {
alert(errMsgLocate + "\nLMSCommit was not successful.");
return "false";
} else {
var result = API.LMSCommit("");
if (result != "true") {
var err = errorHandler();
}
}
return result.toString();
}
/**
* Calls GetLastError()
*/
function doLMSGetLastError()
{
if (API == null) {
alert(errMsgLocate + "\nLMSGetLastError was not successful.");
//since we can't get the error code from the LMS, return a general error
return _GeneralError;
}
return API.LMSGetLastError().toString();
}
/**
* Calls LMSGetErrorString()
*/
function doLMSGetErrorString(errorCode)
{
if (API == null) {
alert(errMsgLocate + "\nLMSGetErrorString was not successful.");
}
return API.LMSGetErrorString(errorCode).toString();
}
/**
* Calls LMSGetDiagnostic()
*/
function doLMSGetDiagnostic(errorCode)
{
if (API == null) {
alert(errMsgLocate + "\nLMSGetDiagnostic was not successful.");
}
return API.LMSGetDiagnostic(errorCode).toString();
}
/**
* Initialise page values
*/
function loadPage()
{
var result = doLMSInitialize();
if (result) {
var status = doLMSGetValue("cmi.core.lesson_status");
if (status == "not attempted") {
doLMSSetValue("cmi.core.lesson_status", "incomplete");
}
exitPageStatus = false;
startTimer();
}
}
/**
* Starts the local timer
*/
function startTimer()
{
startTime = new Date().getTime();
}
/**
* Calculates the total time and sends the result to the LMS
*/
function computeTime()
{
if (startTime != 0) {
var currentDate = new Date().getTime();
var elapsedSeconds = ( (currentDate - startTime) / 1000 );
var formattedTime = convertTotalSeconds(elapsedSeconds);
} else {
formattedTime = "00:00:00.0";
}
doLMSSetValue( "cmi.core.session_time", formattedTime );
}
/**
* Formats the time in a SCORM time format
*/
function convertTotalSeconds(ts)
{
var sec = (ts % 60);
ts -= sec;
var tmp = (ts % 3600); //# of seconds in the total # of minutes
ts -= tmp; //# of seconds in the total # of hours
// convert seconds to conform to CMITimespan type (e.g. SS.00)
sec = Math.round(sec*100)/100;
var strSec = new String(sec);
var strWholeSec = strSec;
var strFractionSec = "";
if (strSec.indexOf(".") != -1) {
strWholeSec = strSec.substring(0, strSec.indexOf("."));
strFractionSec = strSec.substring(strSec.indexOf(".") + 1, strSec.length);
}
if (strWholeSec.length < 2) {
strWholeSec = "0" + strWholeSec;
}
strSec = strWholeSec;
if (strFractionSec.length) {
strSec = strSec + "." + strFractionSec;
}
if ((ts % 3600) != 0)
var hour = 0;
else var hour = (ts / 3600);
if ((tmp % 60) != 0)
var min = 0;
else var min = (tmp / 60);
if ((new String(hour)).length < 2)
hour = "0" + hour;
if ((new String(min)).length < 2)
min = "0" + min;
var rtnVal = hour + ":" + min + ":" + strSec;
return rtnVal
}
/**
* Handles the use of the back button (saves data and closes SCO)
*/
function doBack()
{
checkAnswers(true);
doLMSSetValue( "cmi.core.exit", "suspend" );
computeTime();
exitPageStatus = true;
var result;
result = doLMSCommit();
result = doLMSFinish();
}
/**
* Handles the closure of the current SCO before an interruption. This is only useful if the LMS
* deals with the cmi.core.exit, cmi.core.lesson_status and cmi.core.lesson_mode *and* the SCO
* sends some kind of value for cmi.core.exit, which is not the case here (yet).
*/
function doContinue(status)
{
// Reinitialize Exit to blank
doLMSSetValue( "cmi.core.exit", "" );
var mode = doLMSGetValue( "cmi.core.lesson_mode" );
if ( mode != "review" && mode != "browse" )
{
doLMSSetValue( "cmi.core.lesson_status", status );
}
computeTime();
exitPageStatus = true;
var result;
result = doLMSCommit();
result = doLMSFinish();
}
/**
* handles the recording of everything on a normal shutdown
*/
function doQuit()
{
checkAnswers();
computeTime();
exitPageStatus = true;
var result;
result = doLMSCommit();
result = doLMSFinish();
}
/**
* Called upon unload event from body element
*/
function unloadPage(status)
{
if (!exitPageStatus)
{
// doQuit( status );
}
}
/**
* Checks the answers on the test formular page
*/
function checkAnswers(interrupted)
{
var tmpScore = 0;
var status = 'not attempted';
var scoreMax = 0;
addDebug('Number of questions: '+ questions.length);
for (var i=0; i < questions.length; i++) {
if (questions[i] != undefined && questions[i] != null) {
var idQuestion = questions[i];
var type = questions_types[idQuestion];
var interactionScore = 0;
var interactionAnswers = '';
var interactionCorrectResponses = '';
var interactionType = '';
addDebug('idQuestion: ' +idQuestion + ', Type: ' +type);
addDebug('questions_answers: ');
addDebugTable(questions_answers[idQuestion]);
addDebug('questions_answers_ponderation: ');
addDebugTable(questions_answers_ponderation[idQuestion]);
addDebug('questions_answers_correct: ');
addDebugTable(questions_answers_correct[idQuestion]);
switch (type) {
case 'mcma':
interactionType = 'choice';
var myScore = 0;
for(var j = 0; j< questions_answers[idQuestion].length;j++) {
var idAnswer = questions_answers[idQuestion][j];
var answer = document.getElementById('question_'+(idQuestion)+'_multiple_'+(idAnswer));
if (answer.checked) {
interactionAnswers += idAnswer+'__|';// changed by isaac flores
myScore += questions_answers_ponderation[idQuestion][idAnswer];
}
}
interactionScore = myScore;
scoreMax += questions_score_max[idQuestion];
addDebug("Score: "+myScore);
break;
case 'mcua':
interactionType = 'choice';
var myScore = 0;
for (var j = 0; j<questions_answers[idQuestion].length; j++) {
var idAnswer = questions_answers[idQuestion][j];
var elementId = 'question_'+(idQuestion)+'_unique_'+(idAnswer);
var answer = document.getElementById(elementId);
if (answer.checked) {
addDebug('Element id # "'+ elementId +'" was checked');
interactionAnswers += idAnswer;
addDebug("List of correct answers: "+questions_answers_correct[idQuestion]);
addDebug('Score for this answer: ' + questions_answers_ponderation[idQuestion][idAnswer]);
addDebug("idAnswer: "+idAnswer);
addDebug("Option selected: "+questions_answers_correct[idQuestion][idAnswer]);
if (questions_answers_correct[idQuestion][idAnswer] == 1) {
if (questions_answers_ponderation[idQuestion][idAnswer]) {
myScore += questions_answers_ponderation[idQuestion][idAnswer];
} else {
myScore++;
}
}
}
}
addDebug("Score: "+myScore);
interactionScore = myScore;
scoreMax += questions_score_max[idQuestion];
break;
case 'tf':
interactionType = 'true-false';
var myScore = 0;
for (var j = 0; j < questions_answers[idQuestion].length; j++) {
var idAnswer = questions_answers[idQuestion][j];
var answer = document.getElementById('question_' + idQuestion + '_tf_' + (idAnswer));
if (answer.checked.value) {
interactionAnswers += idAnswer;
for (k = 0; k < questions_answers_correct[idQuestion].length; k++) {
if (questions_answers_correct[idQuestion][k] == idAnswer) {
if (questions_answers_ponderation[idQuestion][idAnswer]) {
myScore += questions_answers_ponderation[idQuestion][idAnswer];
} else {
myScore++;
}
}
}
}
}
addDebug("Score: "+ myScore);
interactionScore = myScore;
scoreMax += questions_score_max[idQuestion];
break;
case 'fib':
interactionType = 'fill-in';
var myScore = 0;
for (var j = 0; j < questions_answers[idQuestion].length; j++) {
var idAnswer = questions_answers[idQuestion][j];
var answer = document.getElementById('question_'+(idQuestion)+'_fib_'+(idAnswer));
if (answer.value) {
interactionAnswers += answer.value + '__|';//changed by isaac flores
for (k = 0; k < questions_answers_correct[idQuestion].length; k++) {
if (questions_answers_correct[idQuestion][k] == answer.value) {
if (questions_answers_ponderation[idQuestion][idAnswer]) {
myScore += questions_answers_ponderation[idQuestion][idAnswer];
} else {
myScore++;
}
}
}
}
}
addDebug("Score: "+myScore);
interactionScore = myScore;
scoreMax += questions_score_max[idQuestion];
break;
case 'matching':
interactionType = 'matching';
var myScore = 0;
addDebug("List of correct answers: ");
console.log(questions_answers_correct[idQuestion]);
for (var j = 0; j < questions_answers[idQuestion].length; j++) {
var idAnswer = questions_answers[idQuestion][j];
var elementId = 'question_' + (idQuestion) + '_matching_' + (idAnswer);
addDebug("---------idAnswer #"+idAnswer+'------------------');
addDebug("Checking element #"+elementId);
var answer = document.getElementById(elementId);
if (answer && answer.value) {
interactionAnswers += answer.value + '__|';//changed by isaac flores
for (k = 0; k < questions_answers_correct[idQuestion].length; k++) {
var left = questions_answers_correct[idQuestion][k][0];
var right = questions_answers_correct[idQuestion][k][1];
addDebug('Left ' + left);
addDebug('Right ' + right);
addDebug('answer.value ' + answer.value);
if (right == idAnswer && left == answer.value) {
addDebug('Score for this answer: ' + questions_answers_ponderation[idQuestion][idAnswer]);
if (questions_answers_ponderation[idQuestion][idAnswer]) {
myScore += questions_answers_ponderation[idQuestion][idAnswer];
} else {
// myScore++;
}
}
}
}
addDebug("Partial score: "+myScore);
addDebug("--------- end --- idAnswer #"+idAnswer+'------------------');
}
addDebug("Score: "+myScore);
interactionScore = myScore;
scoreMax += questions_score_max[idQuestion];
break;
case 'free':
//ignore for now as a score cannot be given
interactionType = 'free';
var answer = document.getElementById('question_'+(idQuestion)+'_free');
if (answer && answer.value) {
interactionAnswers += answer.value
}
//interactionScore = questions_score_max[idQuestion];
interactionScore = 0;
scoreMax += questions_score_max[idQuestion];
//interactionAnswers = document.getElementById('question_'+(idQuestion)+'_free').value;
//correct responses work by pattern, see SCORM Runtime Env Doc
//interactionCorrectResponses += questions_answers_correct[idQuestion].toString();
break;
case 'hotspot':
interactionType = 'sequencing';
interactionScore = 0;
//if(question_score && question_score[idQuestion]){
// interactionScore = question_score[idQuestion];
//} //else, 0
//interactionAnswers = document.getElementById('question_'+(idQuestion)+'_free').innerHTML;
//correct responses work by pattern, see SCORM Runtime Env Doc
//for(k=0;k<questions_answers_correct[idQuestion].length;k++)
//{
// interactionCorrectResponses += questions_answers_correct[idQuestion][k].toString()+',';
//}
break;
case 'exact':
interactionType = 'exact';
interactionScore = 0;
var real_answers = new Array();
for (var j = 0; j < questions_answers[idQuestion].length; j++) {
var idAnswer = questions_answers[idQuestion][j];
var answer = document.getElementById('question_' + (idQuestion) + '_exact_' + (idAnswer));
if (answer.checked == true) {
interactionAnswers += idAnswer+', ';
if (questions_answers_correct[idQuestion][idAnswer] != 0) {
real_answers[j] = true;
} else {
real_answers[j] = false;
}
} else {
if (questions_answers_correct[idQuestion][idAnswer] != 0) {
real_answers[j] = false;
} else {
real_answers[j] = true;
}
}
}
var final_answer = true;
for (var z = 0; z < real_answers.length; z++) {
if (real_answers[z] == false) {
final_answer = false;
}
}
interactionScore = 0;
addDebug(real_answers);
if (final_answer) {
//getting only the first score where we save the weight of all the question
interactionScore = questions_answers_ponderation[idQuestion][1];
}
addDebug("Score: "+interactionScore);
scoreMax += questions_score_max[idQuestion];
break;
}
tmpScore += interactionScore;
doLMSSetValue('cmi.interactions.'+idQuestion+'.id', 'Q'+idQuestion);
doLMSSetValue('cmi.interactions.'+idQuestion+'.type', interactionType);
doLMSSetValue('cmi.interactions.'+idQuestion+'.student_response', interactionAnswers);
doLMSSetValue('cmi.interactions.'+idQuestion+'.result', interactionScore);
}
}
doLMSSetValue('cmi.core.score.min', 0);
doLMSSetValue('cmi.core.score.max', scoreMax);
doLMSSetValue('cmi.core.score.raw', tmpScore);
// Get status
var mastery_score = doLMSGetValue('cmi.student_data.mastery_score');
if (mastery_score <= 0) {
mastery_score = (scoreMax * 0.80);
}
if (tmpScore >= mastery_score) {
status = 'passed';
} else {
status = 'failed';
}
addDebug('student_score: ' + tmpScore);
addDebug('mastery_score: ' + mastery_score);
addDebug('cmi.core.score.max: ' + scoreMax);
addDebug('cmi.core.lesson_status: ' + status);
doLMSSetValue('cmi.core.lesson_status', status);
if (interrupted && (status != 'completed') && (status != 'passed')) {
doLMSSetValue('cmi.core.exit', 'suspended');
}
return false; //do not submit the form
}
(function($){
//Shuffle all rows, while keeping the first column
//Requires: Shuffle
$.fn.shuffleRows = function(){
return this.each(function(){
var main = $(/table/i.test(this.tagName) ? this.tBodies[0] : this);
var firstElem = [], counter=0;
main.children().each(function(){
firstElem.push(this.firstChild);
});
main.shuffle();
main.children().each(function(){
this.insertBefore(firstElem[counter++], this.firstChild);
});
});
}
/* Shuffle is required */
$.fn.shuffle = function() {
return this.each(function(){
var items = $(this).children();
return (items.length)
? $(this).html($.shuffle(items))
: this;
});
}
$.shuffle = function(arr) {
for(
var j, x, i = arr.length; i;
j = parseInt(Math.random() * i),
x = arr[--i], arr[i] = arr[j], arr[j] = x
);
return arr;
}
})(jQuery);
/*
* Assigns any event handler to any element
* @param object Element on which the event is added
* @param string Name of event
* @param string Function to trigger on event
* @param boolean Capture the event and prevent
*/
function addEvent(elm, evType, fn, useCapture)
{
if (elm.addEventListener) {
elm.addEventListener(evType, fn, useCapture);
return true;
} else if(elm.attachEvent) {
var r = elm.attachEvent('on' + evType, fn);
return r;
} else {
elm['on' + evType] = fn;
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- filename=ims_xml.xsd -->
<xsd:schema xmlns="http://www.w3.org/XML/1998/namespace"
targetNamespace="http://www.w3.org/XML/1998/namespace"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<!-- 2001-02-22 edited by Thomas Wason IMS Global Learning Consortium, Inc. -->
<xsd:annotation>
<xsd:documentation>In namespace-aware XML processors, the &quot;xml&quot; prefix is bound to the namespace name http://www.w3.org/XML/1998/namespace.</xsd:documentation>
<xsd:documentation>Do not reference this file in XML instances</xsd:documentation>
<xsd:documentation>Schawn Thropp: Changed the uriReference type to string type</xsd:documentation>
</xsd:annotation>
<xsd:attribute name="lang" type="xsd:language">
<xsd:annotation>
<xsd:documentation>Refers to universal XML 1.0 lang attribute</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="base" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Refers to XML Base: http://www.w3.org/TR/xmlbase</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="link" type="xsd:string"/>
</xsd:schema>

View File

@@ -0,0 +1,345 @@
<?xml version="1.0"?>
<!-- edited with XML Spy v3.5 (http://www.xmlspy.com) by Thomas Wason (private) -->
<!-- filename=ims_cp_rootv1p1p2.xsd -->
<!-- Copyright (2) 2001 IMS Global Learning Consortium, Inc. -->
<!-- edited by Thomas Wason -->
<!-- Conforms to w3c http://www.w3.org/TR/xmlschema-1/ 2000-10-24-->
<xsd:schema xmlns="http://www.imsproject.org/xsd/imscp_rootv1p1p2"
targetNamespace="http://www.imsproject.org/xsd/imscp_rootv1p1p2"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="unqualified" version="IMS CP 1.1.2">
<!-- ******************** -->
<!-- ** Change History ** -->
<!-- ******************** -->
<xsd:annotation>
<xsd:documentation xml:lang="en">DRAFT XSD for IMS Content Packaging version 1.1 DRAFT</xsd:documentation>
<xsd:documentation> Copyright (c) 2001 IMS GLC, Inc. </xsd:documentation>
<xsd:documentation>2000-04-21, Adjustments by T.D. Wason from CP 1.0.</xsd:documentation>
<xsd:documentation>2001-02-22, T.D.Wason: Modify for 2000-10-24 XML-Schema version. Modified to support extension.</xsd:documentation>
<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>
<xsd:documentation>Do not define namespaces for xml in XML instances generated from this xsd.</xsd:documentation>
<xsd:documentation>Imports IMS meta-data xsd, lower case element names. </xsd:documentation>
<xsd:documentation>This XSD provides a reference to the IMS meta-data root element as imsmd:record</xsd:documentation>
<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>
<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>
<xsd:documentation>2001-04-13 Tom Wason: corrected attirbute name structure. Was misnamed type. </xsd:documentation>
<xsd:documentation>2001-05-14 Schawn Thropp: Made all complexType extensible with the group.any</xsd:documentation>
<xsd:documentation>Added the anyAttribute to all complexTypes. Changed the href attribute on the fileType and resourceType to xsd:string</xsd:documentation>
<xsd:documentation>Changed the maxLength of the href, identifierref, parameters, structure attributes to match the Information model.</xsd:documentation>
<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>
<xsd:documentation>Recommendation. attributeGroup attr.imsmd deleted, was not used anywhere. Any attribute declarations that have</xsd:documentation>
<xsd:documentation>use = "default" changed to use="optional" - attr.structure.req.</xsd:documentation>
<xsd:documentation>Any attribute declarations that have value="somevalue" changed to default="somevalue",</xsd:documentation>
<xsd:documentation>attr.structure.req (hierarchical). Removed references to IMS MD Version 1.1.</xsd:documentation>
<xsd:documentation>Modified attribute group "attr.resourcetype.req" to change use from optional</xsd:documentation>
<xsd:documentation>to required to match the information model. As a result the default value also needed to be removed</xsd:documentation>
<xsd:documentation>Name change for XSD. Changed to match version of CP Spec </xsd:documentation>
</xsd:annotation>
<xsd:annotation>
<xsd:documentation>Inclusions and Imports</xsd:documentation>
</xsd:annotation>
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="ims_xml.xsd"/>
<xsd:annotation>
<xsd:documentation>Attribute Declarations</xsd:documentation>
</xsd:annotation>
<!-- **************************** -->
<!-- ** Attribute Declarations ** -->
<!-- **************************** -->
<xsd:attributeGroup name="attr.base">
<xsd:attribute ref="xml:base" use="optional"/>
</xsd:attributeGroup>
<xsd:attributeGroup name="attr.default">
<xsd:attribute name="default" type="xsd:IDREF" use="optional"/>
</xsd:attributeGroup>
<xsd:attributeGroup name="attr.href">
<xsd:attribute name="href" use="optional">
<xsd:simpleType>
<xsd:restriction base="xsd:anyURI">
<xsd:maxLength value="2000"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:attributeGroup>
<xsd:attributeGroup name="attr.href.req">
<xsd:attribute name="href" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:anyURI">
<xsd:maxLength value="2000"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:attributeGroup>
<xsd:attributeGroup name="attr.identifier.req">
<xsd:attribute name="identifier" type="xsd:ID" use="required"/>
</xsd:attributeGroup>
<xsd:attributeGroup name="attr.identifier">
<xsd:attribute name="identifier" type="xsd:ID" use="optional"/>
</xsd:attributeGroup>
<xsd:attributeGroup name="attr.isvisible">
<xsd:attribute name="isvisible" type="xsd:boolean" use="optional"/>
</xsd:attributeGroup>
<xsd:attributeGroup name="attr.parameters">
<xsd:attribute name="parameters" use="optional">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="1000"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:attributeGroup>
<xsd:attributeGroup name="attr.identifierref">
<xsd:attribute name="identifierref" use="optional">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="2000"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:attributeGroup>
<xsd:attributeGroup name="attr.identifierref.req">
<xsd:attribute name="identifierref" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="2000"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:attributeGroup>
<xsd:attributeGroup name="attr.resourcetype.req">
<xsd:attribute name="type" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="1000"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:attributeGroup>
<xsd:attributeGroup name="attr.structure.req">
<xsd:attribute name="structure" use="optional" default="hierarchical">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="200"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:attributeGroup>
<xsd:attributeGroup name="attr.version">
<xsd:attribute name="version" use="optional">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="20"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:attributeGroup>
<xsd:annotation>
<xsd:documentation>element groups</xsd:documentation>
</xsd:annotation>
<xsd:group name="grp.any">
<xsd:annotation>
<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>
</xsd:annotation>
<xsd:sequence>
<xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:group>
<!-- ************************** -->
<!-- ** Element Declarations ** -->
<!-- ************************** -->
<xsd:element name="dependency" type="dependencyType"/>
<xsd:element name="file" type="fileType"/>
<xsd:element name="item" type="itemType"/>
<xsd:element name="manifest" type="manifestType"/>
<xsd:element name="metadata" type="metadataType"/>
<xsd:element name="organization" type="organizationType"/>
<xsd:element name="organizations" type="organizationsType"/>
<xsd:element name="resource" type="resourceType"/>
<xsd:element name="resources" type="resourcesType"/>
<xsd:element name="schema" type="schemaType"/>
<xsd:element name="schemaversion" type="schemaversionType"/>
<xsd:element name="title" type="titleType"/>
<!-- ******************* -->
<!-- ** Complex Types ** -->
<!-- ******************* -->
<!-- **************** -->
<!-- ** dependency ** -->
<!-- **************** -->
<xsd:complexType name="dependencyType">
<xsd:sequence>
<xsd:group ref="grp.any"/>
</xsd:sequence>
<xsd:attributeGroup ref="attr.identifierref.req"/>
<xsd:anyAttribute namespace="##other" processContents="strict"/>
</xsd:complexType>
<!-- ********** -->
<!-- ** file ** -->
<!-- ********** -->
<xsd:complexType name="fileType">
<xsd:sequence>
<xsd:element ref="metadata" minOccurs="0"/>
<xsd:group ref="grp.any"/>
</xsd:sequence>
<xsd:attributeGroup ref="attr.href.req"/>
<xsd:anyAttribute namespace="##other" processContents="strict"/>
</xsd:complexType>
<!-- ********** -->
<!-- ** item ** -->
<!-- ********** -->
<xsd:complexType name="itemType">
<xsd:sequence>
<xsd:element ref="title" minOccurs="0"/>
<xsd:element ref="item" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="metadata" minOccurs="0"/>
<xsd:group ref="grp.any"/>
</xsd:sequence>
<xsd:attributeGroup ref="attr.identifier.req"/>
<xsd:attributeGroup ref="attr.identifierref"/>
<xsd:attributeGroup ref="attr.isvisible"/>
<xsd:attributeGroup ref="attr.parameters"/>
<xsd:anyAttribute namespace="##other" processContents="strict"/>
</xsd:complexType>
<!-- ************** -->
<!-- ** manifest ** -->
<!-- ************** -->
<xsd:complexType name="manifestType">
<xsd:sequence>
<xsd:element ref="metadata" minOccurs="0"/>
<xsd:element ref="organizations"/>
<xsd:element ref="resources"/>
<xsd:element ref="manifest" minOccurs="0" maxOccurs="unbounded"/>
<xsd:group ref="grp.any"/>
</xsd:sequence>
<xsd:attributeGroup ref="attr.identifier.req"/>
<xsd:attributeGroup ref="attr.version"/>
<xsd:attribute ref="xml:base"/>
<xsd:anyAttribute namespace="##other" processContents="strict"/>
</xsd:complexType>
<!-- ************** -->
<!-- ** metadata ** -->
<!-- ************** -->
<xsd:complexType name="metadataType">
<xsd:sequence>
<xsd:element ref="schema" minOccurs="0"/>
<xsd:element ref="schemaversion" minOccurs="0"/>
<xsd:group ref="grp.any"/>
</xsd:sequence>
</xsd:complexType>
<!-- ******************* -->
<!-- ** organizations ** -->
<!-- ******************* -->
<xsd:complexType name="organizationsType">
<xsd:sequence>
<xsd:element ref="organization" minOccurs="0" maxOccurs="unbounded"/>
<xsd:group ref="grp.any"/>
</xsd:sequence>
<xsd:attributeGroup ref="attr.default"/>
<xsd:anyAttribute namespace="##other" processContents="strict"/>
</xsd:complexType>
<!-- ****************** -->
<!-- ** organization ** -->
<!-- ****************** -->
<xsd:complexType name="organizationType">
<xsd:sequence>
<xsd:element ref="title" minOccurs="0"/>
<xsd:element ref="item" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="metadata" minOccurs="0"/>
<xsd:group ref="grp.any"/>
</xsd:sequence>
<xsd:attributeGroup ref="attr.identifier.req"/>
<xsd:attributeGroup ref="attr.structure.req"/>
<xsd:anyAttribute namespace="##other" processContents="strict"/>
</xsd:complexType>
<!-- *************** -->
<!-- ** resources ** -->
<!-- *************** -->
<xsd:complexType name="resourcesType">
<xsd:sequence>
<xsd:element ref="resource" minOccurs="0" maxOccurs="unbounded"/>
<xsd:group ref="grp.any"/>
</xsd:sequence>
<xsd:attributeGroup ref="attr.base"/>
<xsd:anyAttribute namespace="##other" processContents="strict"/>
</xsd:complexType>
<!-- ************** -->
<!-- ** resource ** -->
<!-- ************** -->
<xsd:complexType name="resourceType">
<xsd:sequence>
<xsd:element ref="metadata" minOccurs="0"/>
<xsd:element ref="file" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="dependency" minOccurs="0" maxOccurs="unbounded"/>
<xsd:group ref="grp.any"/>
</xsd:sequence>
<xsd:attributeGroup ref="attr.identifier.req"/>
<xsd:attributeGroup ref="attr.resourcetype.req"/>
<xsd:attributeGroup ref="attr.base"/>
<xsd:attributeGroup ref="attr.href"/>
<xsd:anyAttribute namespace="##other" processContents="strict"/>
</xsd:complexType>
<!-- ****************** -->
<!-- ** Simple Types ** -->
<!-- ****************** -->
<!-- ************ -->
<!-- ** schema ** -->
<!-- ************ -->
<xsd:simpleType name="schemaType">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="100"/>
</xsd:restriction>
</xsd:simpleType>
<!-- ******************* -->
<!-- ** schemaversion ** -->
<!-- ******************* -->
<xsd:simpleType name="schemaversionType">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="20"/>
</xsd:restriction>
</xsd:simpleType>
<!-- *********** -->
<!-- ** title ** -->
<!-- *********** -->
<xsd:simpleType name="titleType">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="200"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>

View File

@@ -0,0 +1,573 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited by Thomas Wason -->
<xsd:schema targetNamespace="http://www.imsglobal.org/xsd/imsmd_rootv1p2p1"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.imsglobal.org/xsd/imsmd_rootv1p2p1"
elementFormDefault="qualified"
version="1.2:1.1 IMS:MD1.2">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="ims_xml.xsd"/>
<!-- ******************** -->
<!-- ** Change History ** -->
<!-- ******************** -->
<xsd:annotation>
<xsd:documentation>2001-04-26 T.D.Wason. IMS meta-data 1.2 XML-Schema. </xsd:documentation>
<xsd:documentation>2001-06-07 S.E.Thropp. Changed the multiplicity on all elements to match the </xsd:documentation>
<xsd:documentation>Final 1.2 Binding Specification. </xsd:documentation>
<xsd:documentation>Changed all elements that use the langstringType to a multiplicy of 1 or more </xsd:documentation>
<xsd:documentation>Changed centity in the contribute element to have a multiplicity of 0 or more. </xsd:documentation>
<xsd:documentation>Changed the requirement element to have a multiplicity of 0 or more. </xsd:documentation>
<xsd:documentation> 2001-07-25 Schawn Thropp. Updates to bring the XSD up to speed with the W3C </xsd:documentation>
<xsd:documentation> XML Schema Recommendation. The following changes were made: Change the </xsd:documentation>
<xsd:documentation> namespace to reference the 5/2/2001 W3C XML Schema Recommendation,the base </xsd:documentation>
<xsd:documentation> type for the durtimeType, simpleType, was changed from timeDuration to duration. </xsd:documentation>
<xsd:documentation> Any attribute declarations that have use="default" had to change to use="optional" </xsd:documentation>
<xsd:documentation> - attr.type. Any attribute declarations that have value ="somevalue" had to change </xsd:documentation>
<xsd:documentation> to default = "somevalue" - attr.type (URI) </xsd:documentation>
<xsd:documentation> 2001-09-04 Schawn Thropp </xsd:documentation>
<xsd:documentation> Changed the targetNamespace and namespace of schema to reflect version change </xsd:documentation>
</xsd:annotation>
<!-- *************************** -->
<!-- ** Attribute Declaration ** -->
<!-- *************************** -->
<xsd:attributeGroup name="attr.type">
<xsd:attribute name="type" use="optional" default="URI">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="URI"/>
<xsd:enumeration value="TEXT"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:attributeGroup>
<xsd:group name="grp.any">
<xsd:annotation>
<xsd:documentation>Any namespaced element from any namespace may be used for 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>
</xsd:annotation>
<xsd:sequence>
<xsd:any namespace="##any" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:group>
<!-- ************************* -->
<!-- ** Element Declaration ** -->
<!-- ************************* -->
<xsd:element name="aggregationlevel" type="aggregationlevelType"/>
<xsd:element name="annotation" type="annotationType"/>
<xsd:element name="catalogentry" type="catalogentryType"/>
<xsd:element name="catalog" type="catalogType"/>
<xsd:element name="centity" type="centityType"/>
<xsd:element name="classification" type="classificationType"/>
<xsd:element name="context" type="contextType"/>
<xsd:element name="contribute" type="contributeType"/>
<xsd:element name="copyrightandotherrestrictions" type="copyrightandotherrestrictionsType"/>
<xsd:element name="cost" type="costType"/>
<xsd:element name="coverage" type="coverageType"/>
<xsd:element name="date" type="dateType"/>
<xsd:element name="datetime" type="datetimeType"/>
<xsd:element name="description" type="descriptionType"/>
<xsd:element name="difficulty" type="difficultyType"/>
<xsd:element name="educational" type="educationalType"/>
<xsd:element name="entry" type="entryType"/>
<xsd:element name="format" type="formatType"/>
<xsd:element name="general" type="generalType"/>
<xsd:element name="identifier" type="xsd:string"/>
<xsd:element name="intendedenduserrole" type="intendedenduserroleType"/>
<xsd:element name="interactivitylevel" type="interactivitylevelType"/>
<xsd:element name="interactivitytype" type="interactivitytypeType"/>
<xsd:element name="keyword" type="keywordType"/>
<xsd:element name="kind" type="kindType"/>
<xsd:element name="langstring" type="langstringType"/>
<xsd:element name="language" type="xsd:string"/>
<xsd:element name="learningresourcetype" type="learningresourcetypeType"/>
<xsd:element name="lifecycle" type="lifecycleType"/>
<xsd:element name="location" type="locationType"/>
<xsd:element name="lom" type="lomType"/>
<xsd:element name="maximumversion" type="minimumversionType"/>
<xsd:element name="metadatascheme" type="metadataschemeType"/>
<xsd:element name="metametadata" type="metametadataType"/>
<xsd:element name="minimumversion" type="maximumversionType"/>
<xsd:element name="name" type="nameType"/>
<xsd:element name="purpose" type="purposeType"/>
<xsd:element name="relation" type="relationType"/>
<xsd:element name="requirement" type="requirementType"/>
<xsd:element name="resource" type="resourceType"/>
<xsd:element name="rights" type="rightsType"/>
<xsd:element name="role" type="roleType"/>
<xsd:element name="semanticdensity" type="semanticdensityType"/>
<xsd:element name="size" type="sizeType"/>
<xsd:element name="source" type="sourceType"/>
<xsd:element name="status" type="statusType"/>
<xsd:element name="structure" type="structureType"/>
<xsd:element name="taxon" type="taxonType"/>
<xsd:element name="taxonpath" type="taxonpathType"/>
<xsd:element name="technical" type="technicalType"/>
<xsd:element name="title" type="titleType"/>
<xsd:element name="type" type="typeType"/>
<xsd:element name="typicalagerange" type="typicalagerangeType"/>
<xsd:element name="typicallearningtime" type="typicallearningtimeType"/>
<xsd:element name="value" type="valueType"/>
<xsd:element name="person" type="personType"/>
<xsd:element name="vcard" type="xsd:string"/>
<xsd:element name="version" type="versionType"/>
<xsd:element name="installationremarks" type="installationremarksType"/>
<xsd:element name="otherplatformrequirements" type="otherplatformrequirementsType"/>
<xsd:element name="duration" type="durationType"/>
<xsd:element name="id" type="idType"/>
<!-- ******************* -->
<!-- ** Complex Types ** -->
<!-- ******************* -->
<xsd:complexType name="aggregationlevelType">
<xsd:sequence>
<xsd:element ref="source"/>
<xsd:element ref="value"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="annotationType" mixed="true">
<xsd:sequence>
<xsd:element ref="person" minOccurs="0"/>
<xsd:element ref="date" minOccurs="0"/>
<xsd:element ref="description" minOccurs="0"/>
<xsd:group ref="grp.any"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="catalogentryType" mixed="true">
<xsd:sequence>
<xsd:element ref="catalog"/>
<xsd:element ref="entry"/>
<xsd:group ref="grp.any"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="centityType">
<xsd:sequence>
<xsd:element ref="vcard"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="classificationType" mixed="true">
<xsd:sequence>
<xsd:element ref="purpose" minOccurs="0"/>
<xsd:element ref="taxonpath" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="description" minOccurs="0"/>
<xsd:element ref="keyword" minOccurs="0" maxOccurs="unbounded"/>
<xsd:group ref="grp.any"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="contextType">
<xsd:sequence>
<xsd:element ref="source"/>
<xsd:element ref="value"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="contributeType" mixed="true">
<xsd:sequence>
<xsd:element ref="role"/>
<xsd:element ref="centity" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="date" minOccurs="0"/>
<xsd:group ref="grp.any"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="copyrightandotherrestrictionsType">
<xsd:sequence>
<xsd:element ref="source"/>
<xsd:element ref="value"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="costType">
<xsd:sequence>
<xsd:element ref="source"/>
<xsd:element ref="value"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="coverageType">
<xsd:sequence>
<xsd:element ref="langstring" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="dateType">
<xsd:sequence>
<xsd:element ref="datetime" minOccurs="0"/>
<xsd:element ref="description" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="descriptionType">
<xsd:sequence>
<xsd:element ref="langstring" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="difficultyType">
<xsd:sequence>
<xsd:element ref="source"/>
<xsd:element ref="value"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="durationType">
<xsd:sequence>
<xsd:element ref="datetime" minOccurs="0"/>
<xsd:element ref="description" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="educationalType" mixed="true">
<xsd:sequence>
<xsd:element ref="interactivitytype" minOccurs="0"/>
<xsd:element ref="learningresourcetype" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="interactivitylevel" minOccurs="0"/>
<xsd:element ref="semanticdensity" minOccurs="0"/>
<xsd:element ref="intendedenduserrole" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="context" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="typicalagerange" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="difficulty" minOccurs="0"/>
<xsd:element ref="typicallearningtime" minOccurs="0"/>
<xsd:element ref="description" minOccurs="0"/>
<xsd:element ref="language" minOccurs="0" maxOccurs="unbounded"/>
<xsd:group ref="grp.any"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="entryType">
<xsd:sequence>
<xsd:element ref="langstring" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="generalType" mixed="true">
<xsd:sequence>
<xsd:element ref="identifier" minOccurs="0"/>
<xsd:element ref="title" minOccurs="0"/>
<xsd:element ref="catalogentry" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="language" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="description" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="keyword" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="coverage" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="structure" minOccurs="0"/>
<xsd:element ref="aggregationlevel" minOccurs="0"/>
<xsd:group ref="grp.any"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="installationremarksType">
<xsd:sequence>
<xsd:element ref="langstring" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="intendedenduserroleType">
<xsd:sequence>
<xsd:element ref="source"/>
<xsd:element ref="value"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="interactivitylevelType">
<xsd:sequence>
<xsd:element ref="source"/>
<xsd:element ref="value"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="interactivitytypeType">
<xsd:sequence>
<xsd:element ref="source"/>
<xsd:element ref="value"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="keywordType">
<xsd:sequence>
<xsd:element ref="langstring" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="kindType">
<xsd:sequence>
<xsd:element ref="source"/>
<xsd:element ref="value"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="langstringType">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute ref="xml:lang"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="learningresourcetypeType">
<xsd:sequence>
<xsd:element ref="source"/>
<xsd:element ref="value"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="lifecycleType" mixed="true">
<xsd:sequence>
<xsd:element ref="version" minOccurs="0"/>
<xsd:element ref="status" minOccurs="0"/>
<xsd:element ref="contribute" minOccurs="0" maxOccurs="unbounded"/>
<xsd:group ref="grp.any"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="locationType">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attributeGroup ref="attr.type"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="lomType">
<xsd:sequence>
<xsd:element ref="general" minOccurs="0"/>
<xsd:element ref="lifecycle" minOccurs="0"/>
<xsd:element ref="metametadata" minOccurs="0"/>
<xsd:element ref="technical" minOccurs="0"/>
<xsd:element ref="educational" minOccurs="0"/>
<xsd:element ref="rights" minOccurs="0"/>
<xsd:element ref="relation" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="annotation" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="classification" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="metametadataType" mixed="true">
<xsd:sequence>
<xsd:element ref="identifier" minOccurs="0"/>
<xsd:element ref="catalogentry" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="contribute" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="metadatascheme" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="language" minOccurs="0"/>
<xsd:group ref="grp.any"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="nameType">
<xsd:sequence>
<xsd:element ref="source"/>
<xsd:element ref="value"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="otherplatformrequirementsType">
<xsd:sequence>
<xsd:element ref="langstring" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="personType">
<xsd:sequence>
<xsd:element ref="vcard"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="purposeType">
<xsd:sequence>
<xsd:element ref="source"/>
<xsd:element ref="value"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="relationType" mixed="true">
<xsd:sequence>
<xsd:element ref="kind" minOccurs="0"/>
<xsd:element ref="resource" minOccurs="0"/>
<xsd:group ref="grp.any"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="requirementType" mixed="true">
<xsd:sequence>
<xsd:element ref="type" minOccurs="0"/>
<xsd:element ref="name" minOccurs="0"/>
<xsd:element ref="minimumversion" minOccurs="0"/>
<xsd:element ref="maximumversion" minOccurs="0"/>
<xsd:group ref="grp.any"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="resourceType" mixed="true">
<xsd:sequence>
<xsd:element ref="identifier" minOccurs="0"/>
<xsd:element ref="description" minOccurs="0"/>
<xsd:element ref="catalogentry" minOccurs="0" maxOccurs="unbounded"/>
<xsd:group ref="grp.any"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="rightsType" mixed="true">
<xsd:sequence>
<xsd:element ref="cost" minOccurs="0"/>
<xsd:element ref="copyrightandotherrestrictions" minOccurs="0"/>
<xsd:element ref="description" minOccurs="0"/>
<xsd:group ref="grp.any"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="roleType">
<xsd:sequence>
<xsd:element ref="source"/>
<xsd:element ref="value"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="semanticdensityType">
<xsd:sequence>
<xsd:element ref="source"/>
<xsd:element ref="value"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="sourceType">
<xsd:sequence>
<xsd:element ref="langstring"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="statusType">
<xsd:sequence>
<xsd:element ref="source"/>
<xsd:element ref="value"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="stringType">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute ref="xml:lang"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="structureType">
<xsd:sequence>
<xsd:element ref="source"/>
<xsd:element ref="value"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="taxonpathType">
<xsd:sequence>
<xsd:element ref="source" minOccurs="0"/>
<xsd:element ref="taxon" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="taxonType">
<xsd:sequence>
<xsd:element ref="id" minOccurs="0"/>
<xsd:element ref="entry" minOccurs="0"/>
<xsd:element ref="taxon" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="technicalType" mixed="true">
<xsd:sequence>
<xsd:element ref="format" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="size" minOccurs="0"/>
<xsd:element ref="location" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="requirement" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="installationremarks" minOccurs="0"/>
<xsd:element ref="otherplatformrequirements" minOccurs="0"/>
<xsd:element ref="duration" minOccurs="0"/>
<xsd:group ref="grp.any"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="titleType">
<xsd:sequence>
<xsd:element ref="langstring" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="typeType">
<xsd:sequence>
<xsd:element ref="source"/>
<xsd:element ref="value"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="typicalagerangeType">
<xsd:sequence>
<xsd:element ref="langstring" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="typicallearningtimeType">
<xsd:sequence>
<xsd:element ref="datetime" minOccurs="0"/>
<xsd:element ref="description" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="valueType">
<xsd:sequence>
<xsd:element ref="langstring"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="versionType">
<xsd:sequence>
<xsd:element ref="langstring" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<!-- ****************** -->
<!-- ** Simple Types ** -->
<!-- ****************** -->
<xsd:simpleType name="formatType">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="sizeType">
<xsd:restriction base="xsd:int"/>
</xsd:simpleType>
<xsd:simpleType name="datetimeType">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="idType">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="metadataschemeType">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="catalogType">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="minimumversionType">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="maximumversionType">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
</xsd:schema>

146
main/lp/packaging/xml.xsd Normal file
View File

@@ -0,0 +1,146 @@
<?xml version='1.0'?>
<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en">
<xs:annotation>
<xs:documentation>
See http://www.w3.org/XML/1998/namespace.html and
http://www.w3.org/TR/REC-xml for information about this namespace.
This schema document describes the XML namespace, in a form
suitable for import by other schema documents.
Note that local names in this namespace are intended to be defined
only by the World Wide Web Consortium or its subgroups. The
following names are currently defined in this namespace and should
not be used with conflicting semantics by any Working Group,
specification, or document instance:
base (as an attribute name): denotes an attribute whose value
provides a URI to be used as the base for interpreting any
relative URIs in the scope of the element on which it
appears; its value is inherited. This name is reserved
by virtue of its definition in the XML Base specification.
id (as an attribute name): denotes an attribute whose value
should be interpreted as if declared to be of type ID.
The xml:id specification is not yet a W3C Recommendation,
but this attribute is included here to facilitate experimentation
with the mechanisms it proposes. Note that it is _not_ included
in the specialAttrs attribute group.
lang (as an attribute name): denotes an attribute whose value
is a language code for the natural language of the content of
any element; its value is inherited. This name is reserved
by virtue of its definition in the XML specification.
space (as an attribute name): denotes an attribute whose
value is a keyword indicating what whitespace processing
discipline is intended for the content of the element; its
value is inherited. This name is reserved by virtue of its
definition in the XML specification.
Father (in any context at all): denotes Jon Bosak, the chair of
the original XML Working Group. This name is reserved by
the following decision of the W3C XML Plenary and
XML Coordination groups:
In appreciation for his vision, leadership and dedication
the W3C XML Plenary on this 10th day of February, 2000
reserves for Jon Bosak in perpetuity the XML name
xml:Father
</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation>This schema defines attributes and an attribute group
suitable for use by
schemas wishing to allow xml:base, xml:lang, xml:space or xml:id
attributes on elements they define.
To enable this, such a schema must import this schema
for the XML namespace, e.g. as follows:
&lt;schema . . .>
. . .
&lt;import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/xml.xsd"/>
Subsequently, qualified reference to any of the attributes
or the group defined below will have the desired effect, e.g.
&lt;type . . .>
. . .
&lt;attributeGroup ref="xml:specialAttrs"/>
will define a type which will schema-validate an instance
element with any of those attributes</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation>In keeping with the XML Schema WG's standard versioning
policy, this schema document will persist at
http://www.w3.org/2005/08/xml.xsd.
At the date of issue it can also be found at
http://www.w3.org/2001/xml.xsd.
The schema document at that URI may however change in the future,
in order to remain compatible with the latest version of XML Schema
itself, or with the XML namespace itself. In other words, if the XML
Schema or XML namespaces change, the version of this document at
http://www.w3.org/2001/xml.xsd will change
accordingly; the version at
http://www.w3.org/2005/08/xml.xsd will not change.
</xs:documentation>
</xs:annotation>
<xs:attribute name="lang">
<xs:annotation>
<xs:documentation>Attempting to install the relevant ISO 2- and 3-letter
codes as the enumerated possible values is probably never
going to be a realistic possibility. See
RFC 3066 at http://www.ietf.org/rfc/rfc3066.txt and the IANA registry
at http://www.iana.org/assignments/lang-tag-apps.htm for
further information.
The union allows for the 'un-declaration' of xml:lang with
the empty string.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:union memberTypes="xs:language">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value=""/>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="space">
<xs:simpleType>
<xs:restriction base="xs:NCName">
<xs:enumeration value="default"/>
<xs:enumeration value="preserve"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="base" type="xs:anyURI">
<xs:annotation>
<xs:documentation>See http://www.w3.org/TR/xmlbase/ for
information about this attribute.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="id" type="xs:ID">
<xs:annotation>
<xs:documentation>See http://www.w3.org/TR/xml-id/ for
information about this attribute.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup name="specialAttrs">
<xs:attribute ref="xml:base"/>
<xs:attribute ref="xml:lang"/>
<xs:attribute ref="xml:space"/>
</xs:attributeGroup>
</xs:schema>