<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns="http://ltsc.ieee.org/xsd/1484_11_3"
  xmlns:t="http://ltsc.ieee.org/xsd/1484_11_3"
  targetNamespace="http://ltsc.ieee.org/xsd/1484_11_3"
  elementFormDefault="qualified" version="1484.11.3-1.0">
  <xs:annotation>
    <xs:documentation xml:lang="en">
      This schema is specified in IEEE 1484.11.3-2005, "IEEE Standard
      for Learning Technology - Extensible Markup Language (XML)
      Binding for Data Model for Content Object Communication."
      This schema is a World Wide Web Consortium (W3C) Extensible
      Markup Language (XML) binding of the data model defined in IEEE
      1484.11.1-2004, "IEEE Standard for Learning Technology - Data
      Model for Content Object Communication."
      The purpose of this schema is to allow the creation of IEEE
      1418.11.1-2004 data-model instances in XML. This schema uses the
      W3C XML Schema definition language as the encoding. This allows
      for interoperability and the exchange of data-model instances
      between various systems.
      This schema shall not be modified but may be included in
      derivative works.

      Copyright (c) 2005 Institute of Electrical and Electronics
      Engineers, Inc.

      USE AT YOUR OWN RISK

    </xs:documentation>
  </xs:annotation>
  <!--  -->
  <!-- The first half of this document follows the order of the
       Data Model document clauses. -->
  <!-- -->
  <xs:element name="cocd" type="cocdType"/>
  <xs:complexType name="cocdType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements IEEE 1484.11.1-2004,
        Clause 6.1: Content object communication
      </xs:documentation>
    </xs:annotation>
    <xs:all>
      <xs:element ref="commentsFromLearner" minOccurs="0"/>
      <xs:element ref="commentsFromLMS" minOccurs="0"/>
      <xs:element ref="completionStatus" minOccurs="0"/>
      <xs:element ref="completionThreshold" minOccurs="0"/>
      <xs:element ref="credit" minOccurs="0"/>
      <xs:element ref="dataModelVersion" minOccurs="0"/>
      <xs:element ref="entry" minOccurs="0"/>
      <xs:element ref="exit" minOccurs="0"/>
      <xs:element ref="interactions" minOccurs="0"/>
      <xs:element ref="launchData" minOccurs="0"/>
      <xs:element ref="learnerId" minOccurs="0"/>
      <xs:element ref="learnerName" minOccurs="0"/>
      <xs:element ref="learnerPreferenceData" minOccurs="0"/>
      <xs:element ref="lessonStatus" minOccurs="0"/>
      <xs:element ref="location" minOccurs="0"/>
      <xs:element ref="maxTimeAllowed" minOccurs="0"/>
      <xs:element ref="mode" minOccurs="0"/>
      <xs:element ref="objectives" minOccurs="0"/>
      <xs:element ref="progressMeasure" minOccurs="0"/>
      <xs:element ref="rawPassingScore" minOccurs="0"/>
      <xs:element ref="scaledPassingScore" minOccurs="0"/>
      <xs:element ref="score" minOccurs="0"/>
      <xs:element ref="sessionTime" minOccurs="0"/>
      <xs:element ref="successStatus" minOccurs="0"/>
      <xs:element ref="suspendData" minOccurs="0"/>
      <xs:element ref="timeLimitAction" minOccurs="0"/>
      <xs:element ref="totalTime" minOccurs="0"/>
    </xs:all>
  </xs:complexType>
  <xs:element name="commentsFromLearner">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.1.1:  Comments from learner
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="commentFromLearner" type="commentType"
          minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
      <xs:attribute name="collectionType" fixed="array"/>
      <xs:attribute name="spm" fixed="250"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="commentsFromLMS">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.1.2: Comments from LMS
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="commentFromLMS" type="commentType"
          minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
      <xs:attribute name="collectionType" fixed="array"/>
      <xs:attribute name="spm" fixed="100"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="completionStatus" type="completionStatusType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.1.3: Completion status
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="completionThreshold" type="progressMeasureType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.1.4: Completion threshold
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="credit">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.1.5: Credit
      </xs:documentation>
    </xs:annotation>
    <xs:simpleType>
      <xs:restriction base="xs:token">
        <xs:enumeration value="credit"/>
        <xs:enumeration value="no_credit"/>
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
  <xs:element name="dataModelVersion" type="literalString250Type">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.1.6: Data model version
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="entry">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.1.7: Entry
      </xs:documentation>
    </xs:annotation>
    <xs:simpleType>
      <xs:restriction base="xs:token">
        <xs:enumeration value="ab_initio"/>
        <xs:enumeration value="resume"/>
        <xs:enumeration value=""/>
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
  <xs:element name="exit">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.1.8: Exit
      </xs:documentation>
    </xs:annotation>
    <xs:simpleType>
      <xs:restriction base="xs:token">
        <xs:enumeration value="logout"/>
        <xs:enumeration value="normal"/>
        <xs:enumeration value="suspend"/>
        <xs:enumeration value="timeout"/>
        <xs:enumeration value=""/>
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
  <xs:element name="interactions" type="interactionsType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.1.9: Interactions
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="launchData" type="literalString4000Type">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.1.10: Launch data
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="learnerId" type="longIdentifierType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.1.11: Learner ID
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="learnerName" type="localizedString250Type">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.1.12: Learner name
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="learnerPreferenceData"
    type="learnerPreferenceType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.1.13: Learner preference data
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="lessonStatus" type="legacyStatusType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.1.14: Lesson status
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="location" type="literalString1000Type">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.1.15: Location
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="maxTimeAllowed" type="timeIntervalType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.1.16: Max time allowed
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="mode">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.1.17: Mode
      </xs:documentation>
    </xs:annotation>
    <xs:simpleType>
      <xs:restriction base="xs:token">
        <xs:enumeration value="browse"/>
        <xs:enumeration value="normal"/>
        <xs:enumeration value="review"/>
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
  <xs:element name="objectives" type="objectivesType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.1.18: Objectives
      </xs:documentation>
    </xs:annotation>
    <xs:unique name="uniqueInSetOfObjectives">
      <xs:selector xpath="./t:objective"/>
      <xs:field xpath="t:identifier"/>
    </xs:unique>
  </xs:element>
  <xs:element name="progressMeasure" type="progressMeasureType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.1.19: Progress measure
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="rawPassingScore" type="real7Type">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.1.20: Raw passing score
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="scaledPassingScore" type="scaledScoreType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.1.21: Scaled passing score
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="score" type="scoreType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.1.22: Score
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="sessionTime" type="timeIntervalType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.1.23: Session time
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="successStatus" type="successStatusType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.1.24: Success status
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="suspendData" type="literalString4000Type">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.1.25: Suspend data
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="timeLimitAction">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.1.26: Time limit action
      </xs:documentation>
    </xs:annotation>
    <xs:simpleType>
      <xs:restriction base="xs:token">
        <xs:enumeration value="continue_message"/>
        <xs:enumeration value="continue_no_message"/>
        <xs:enumeration value="exit_message"/>
        <xs:enumeration value="exit_no_message"/>
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
  <xs:element name="totalTime" type="timeIntervalType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.1.27: Total time
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <!--  -->
  <!-- Global type declarations defined by numbered clauses in
    IEEE 1484.11.1 -->
  <!--  -->
  <xs:complexType name="commentType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.2.1: Comment type
      </xs:documentation>
    </xs:annotation>
    <xs:all>
      <xs:element name="comment" type="localizedString4000Type"/>
      <xs:element name="location" type="literalString1000Type"
        minOccurs="0"/>
      <xs:element name="timeStamp" type="dateTimeType" minOccurs="0"/>
    </xs:all>
  </xs:complexType>
  <xs:simpleType name="completionStatusType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.2.2: Completion status type
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="completed"/>
      <xs:enumeration value="incomplete"/>
      <xs:enumeration value="not_attempted"/>
      <xs:enumeration value="unknown"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="dateTimeType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.2.3: Date time type
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:dateTime"/>
  </xs:simpleType>
  <xs:simpleType name="languageType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.2.4: Language type. Must remain simpleType
        because it is used as value for attributes
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:language">
      <xs:annotation>
        <xs:appinfo>
          <!-- <spm>250</spm> -->
        </xs:appinfo>
      </xs:annotation>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="localizedStringType" abstract="true">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.2.5: Localized string type.
        The Localized String Type is implemented as several
        variations with embedded SPM information.
        The SPM is not enforced by XML validators but may
        be useful for applications.
      </xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="literalStringType">
        <xs:attribute name="lang" type="languageType"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="localizedString250Type">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.2.5: Localized string type with SPM=250
      </xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="localizedStringType">
        <xs:attribute name="spm" fixed="250"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="localizedString4000Type">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.2.5: Localized string type with SPM=4000
      </xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="localizedStringType">
        <xs:attribute name="spm" fixed="4000"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="longIdentifierType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.2.6: Long identifier type
      </xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="xs:anyURI">
        <xs:attribute name="spm" fixed="4000"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:simpleType name="progressMeasureType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.2.7: Progress measure type
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="real7Type">
      <xs:minInclusive value="0"/>
      <xs:maxInclusive value="1"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="scoreType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.2.8: Score type
      </xs:documentation>
    </xs:annotation>
    <xs:all>
      <xs:element name="scaled" type="scaledScoreType" minOccurs="0"/>
      <xs:element name="max" type="real7Type" minOccurs="0"/>
      <xs:element name="min" type="real7Type" minOccurs="0"/>
      <xs:element name="raw" type="real7Type" minOccurs="0"/>
    </xs:all>
  </xs:complexType>
  <xs:complexType name="shortIdentifierType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.2.9: Short identifier type
      </xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="xs:anyURI">
        <xs:attribute name="spm" fixed="250"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:simpleType name="successStatusType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.2.10: Success status type
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="failed"/>
      <xs:enumeration value="passed"/>
      <xs:enumeration value="unknown"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="real7Type">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        As explained in IEEE 1484.11.1-2004, Annex B.1 Real data type
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:decimal"/>
  </xs:simpleType>
  <xs:simpleType name="timeIntervalType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        As explained in IEEE 1484.11.1-2004, Annex B.2 Time interval
        Data type
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:duration"/>
  </xs:simpleType>
  <!--  -->
  <!-- Above this, things follow the order of the Data Model
       document clauses. -->
  <!-- ============================================================ -->
  <!-- Below this are things that did not fit neatly above. They are
       organized as elements, attributes, groups, simple types, complex
       types and alphabetically by name within each of those
       categories.  -->
  <!--  -->
  <!-- === ELEMENTS === -->
  <!-- Organized in alphabetic order by element name -->
  <!--  -->
  <xs:element name="choices" type="setOfChoicesType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Set of short identifiers for interaction type "multiple
        choice" as specified in 6.1.9.5: Correct response and 6.1.9.7:
        Learner response.
    </xs:documentation>
    </xs:annotation>
    <xs:unique name="uniqueInChoicesIds">
      <xs:selector xpath="./t:choice"/>
      <xs:field xpath="."/>
    </xs:unique>
  </xs:element>
  <!--  -->
  <!-- === ATTRIBUTES === -->
  <!-- Organized in alphabetic order by attribute name -->
  <!--  -->
  <xs:attribute name="collectionType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        The collectionType attribute is used to inject Data Model
        information about aggregation that cannot be expressed in XML
        schema. When defined for an element or type in this schema,
        this attribute is given a fixed values. Even if the attribute
        and value are not specified in an XML instance, the XML schema
        processor makes them available to the processing application.
      </xs:documentation>
    </xs:annotation>
    <xs:simpleType>
      <xs:restriction base="xs:token">
        <xs:enumeration value="bag"/>
        <xs:enumeration value="array"/>
        <xs:enumeration value="set"/>
      </xs:restriction>
    </xs:simpleType>
  </xs:attribute>
  <xs:attribute name="spm" type="xs:integer">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        The spm attribute is used to inject Data Model information
        about SPM that cannot be expressed in XML schema. When defined
        for an element or type in this schema, this attribute is given
        a fixed values. Even if the attribute and value are not
        specified in an XML instance, the XML schema processor makes
        them available to the processing application.
      </xs:documentation>
    </xs:annotation>
  </xs:attribute>
  <!--  -->
  <!-- === GROUPS === -->
  <!-- Organized in alphabetic order by group name -->
  <!--  -->
  <xs:group name="grpCorrectFillIn">
    <xs:sequence>
      <xs:annotation>
        <xs:appinfo>
          <!--
            <spm>5</spm><collectionType>bag</collectionType>
          -->
        </xs:appinfo>
      </xs:annotation>
      <xs:element name="fillMatches" minOccurs="0"
        maxOccurs="unbounded">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="matchText" type="localizedString250Type"
              maxOccurs="unbounded"/>
          </xs:sequence>
          <xs:attribute name="caseMatters" type="trueFalseType"
            use="optional" default="false"/>
          <xs:attribute name="orderMatters" type="trueFalseType"
            use="optional" default="true"/>
          <xs:attribute name="collectionType" fixed="array"/>
          <xs:attribute name="spm" fixed="10"/>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:group>
  <xs:group name="grpCorrectLikert">
    <xs:sequence>
      <xs:element name="choice" type="shortIdentifierType"
        minOccurs="0"/>
    </xs:sequence>
  </xs:group>
  <xs:group name="grpCorrectLongFillIn">
    <xs:sequence>
      <xs:annotation>
        <xs:appinfo>
          <!--
            <spm>5</spm><collectionType>bag</collectionType>
          -->
        </xs:appinfo>
      </xs:annotation>
      <xs:element name="matchText" maxOccurs="unbounded">
        <xs:complexType>
          <xs:simpleContent>
            <xs:extension base="localizedString4000Type">
              <xs:attribute name="caseMatters" type="trueFalseType"
                use="optional" default="false"/>
            </xs:extension>
          </xs:simpleContent>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:group>
  <xs:group name="grpCorrectMatching">
    <xs:sequence>
      <xs:annotation>
        <xs:appinfo>
          <!--
            <spm>5</spm><collectionType>bag</collectionType>
          -->
        </xs:appinfo>
      </xs:annotation>
      <xs:element name="matchPattern" type="matchingPairsType"
        maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:group>
  <xs:group name="grpCorrectMultipleChoice">
    <xs:sequence>
      <xs:annotation>
        <xs:appinfo>
          <!--
            <spm>10</spm><collectionType>set</collectionType>
          -->
        </xs:appinfo>
      </xs:annotation>
      <xs:element ref="choices" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:group>
  <xs:group name="grpCorrectNumeric">
    <xs:sequence>
      <xs:element name="min" type="real7Type" minOccurs="0"/>
      <xs:element name="max" type="real7Type" minOccurs="0"/>
    </xs:sequence>
  </xs:group>
  <xs:group name="grpCorrectOther">
    <xs:sequence>
      <xs:element name="correctOther" type="literalString4000Type"/>
    </xs:sequence>
  </xs:group>
  <xs:group name="grpCorrectPerformance">
    <xs:sequence>
      <xs:annotation>
        <xs:appinfo>
          <!--
            <spm>5</spm><collectionType>bag</collectionType>
          -->
        </xs:appinfo>
      </xs:annotation>
      <xs:element name="performancePattern"
        type="correctPerformancePatternType" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:group>
  <xs:group name="grpCorrectSequencing">
    <xs:sequence>
      <xs:annotation>
        <xs:appinfo>
          <!--
            <spm>5</spm><collectionType>bag</collectionType>
          -->
        </xs:appinfo>
      </xs:annotation>
      <xs:element name="stepSequence" type="stepSequenceType"
        maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:group>
  <xs:group name="grpCorrectTrueFalse">
    <xs:sequence>
      <xs:element name="trueOrFalse" type="trueFalseType"/>
    </xs:sequence>
  </xs:group>
  <!-- variant groups for interaction responses -->
  <xs:group name="grpResponseFillIn">
    <xs:sequence>
      <xs:annotation>
        <xs:appinfo>
          <!--
            <spm>10</spm><collectionType>array</collectionType>
          -->
        </xs:appinfo>
      </xs:annotation>
      <xs:element name="fillString" type="localizedString250Type"
        minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:appinfo>
            <!-- <spm>250</spm> -->
          </xs:appinfo>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:group>
  <xs:group name="grpResponseLikert">
    <xs:sequence>
      <xs:element name="choice" type="shortIdentifierType"
        minOccurs="0"/>
    </xs:sequence>
  </xs:group>
  <xs:group name="grpResponseLongFillIn">
    <xs:sequence>
      <xs:element name="longFillString" type="localizedString4000Type"
        minOccurs="0"/>
    </xs:sequence>
  </xs:group>
  <xs:group name="grpResponseMatching">
    <xs:sequence>
      <xs:element name="matchPattern" type="matchingPairsType"/>
    </xs:sequence>
  </xs:group>
  <xs:group name="grpResponseMultipleChoice">
    <xs:sequence>
      <xs:element ref="choices"/>
    </xs:sequence>
  </xs:group>
  <xs:group name="grpResponseNumeric">
    <xs:sequence>
      <xs:element name="number" type="real7Type" minOccurs="0"/>
    </xs:sequence>
  </xs:group>
  <xs:group name="grpResponseOther">
    <xs:sequence>
      <xs:element name="responseOther" type="literalString4000Type"/>
    </xs:sequence>
  </xs:group>
  <!--  -->
  <xs:group name="grpResponsePerformance">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        The learner response for interaction type "performance"
        as specified in 6.1.9.7: Learner response
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:annotation>
        <xs:appinfo>
          <!--
            <spm>250</spm><collectionType>array</collectionType>
          -->
        </xs:appinfo>
      </xs:annotation>
      <xs:element name="step" type="learnerPerformanceStepType"
        minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:group>
  <xs:group name="grpResponseSequencing">
    <xs:sequence>
      <xs:element name="steps" type="stepSequenceType" minOccurs="0"/>
    </xs:sequence>
  </xs:group>
  <xs:group name="grpResponseTrueFalse">
    <xs:sequence>
      <xs:element name="trueOrFalse" type="trueFalseType"
        minOccurs="0"/>
    </xs:sequence>
  </xs:group>
  <!--  -->
  <!-- === SIMPLE TYPES === -->
  <!-- Organized in alphabetic order by type name -->
  <!--  -->
  <xs:simpleType name="interactionResultType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Reusable type definition used for 6.1.9.8: Result
        The value of result can be either a numeric value
        or a specified token. This element uses xs:union to avoid
        having to define sub-elements with arbitrary names.
      </xs:documentation>
    </xs:annotation>
    <xs:union memberTypes="real7Type interactionResultTokenType"/>
  </xs:simpleType>
  <xs:simpleType name="interactionResultTokenType">
    <xs:restriction base="xs:token">
      <xs:enumeration value="correct"/>
      <xs:enumeration value="incorrect"/>
      <xs:enumeration value="neutral"/>
      <xs:enumeration value="unanticipated"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="interactionTypeType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.1.9.2: Type
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="true_false"/>
      <xs:enumeration value="multiple_choice"/>
      <xs:enumeration value="fill_in"/>
      <xs:enumeration value="long_fill_in"/>
      <xs:enumeration value="likert"/>
      <xs:enumeration value="matching"/>
      <xs:enumeration value="performance"/>
      <xs:enumeration value="sequencing"/>
      <xs:enumeration value="numeric"/>
      <xs:enumeration value="other"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="literalStringType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Ensures preservation of whitespace
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="legacyStatusType">
    <xs:restriction base="xs:token">
      <xs:enumeration value="browsed"/>
      <xs:enumeration value="completed"/>
      <xs:enumeration value="failed"/>
      <xs:enumeration value="incomplete"/>
      <xs:enumeration value="not_attempted"/>
      <xs:enumeration value="passed"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="scaledScoreType">
    <xs:restriction base="real7Type">
      <xs:minInclusive value="-1"/>
      <xs:maxInclusive value="1"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="trueFalseType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        True and false options for interaction type "true_false"
        as specified in 6.1.9.5: Correct response and 6.1.9.7:
        Learner response.
        Also used for tokens for various other boolean elements.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="true"/>
      <xs:enumeration value="false"/>
    </xs:restriction>
  </xs:simpleType>
  <!--  -->
  <!-- === COMPLEX TYPES === -->
  <!-- Organized in alphabetic order by type name -->
  <!--  -->
  <xs:complexType name="setOfChoicesType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Set of short identifiers for interaction type "multiple choice"
        as specified in 6.1.9.5: Correct response and 6.1.9.7: Learner
        response.
    </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="choice" type="shortIdentifierType"
        minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="collectionType" fixed="set"/>
    <xs:attribute name="spm" fixed="36"/>
  </xs:complexType>
  <xs:complexType name="correctPerformancePatternType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        A correct response record (order_matters + answers)
        For interaction type "performance"
        as specified in 6.1.9.5: Correct response
    </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="step" minOccurs="0" maxOccurs="unbounded">
        <xs:complexType>
          <xs:all>
            <xs:element name="stepName" type="shortIdentifierType"
              minOccurs="0"/>
            <xs:element name="stepAnswer" minOccurs="0">
              <xs:complexType>
                <xs:choice>
                  <xs:element name="literal"
                    type="literalString250Type" minOccurs="0"/>
                  <xs:element name="numeric" minOccurs="0">
                    <xs:complexType>
                      <xs:attribute name="min" type="real7Type"/>
                      <xs:attribute name="max" type="real7Type"/>
                    </xs:complexType>
                  </xs:element>
                </xs:choice>
              </xs:complexType>
            </xs:element>
          </xs:all>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="orderMatters" type="trueFalseType"
      use="optional" default="true"/>
    <xs:attribute name="collectionType" fixed="array"/>
    <xs:attribute name="spm" fixed="250"/>
  </xs:complexType>
  <xs:complexType name="correctResponsesType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.1.9.5: Correct responses.
        Note: It is up to the implementation to choose the correct
        group to match the interaction type. This correspondence cannot
        be expressed or validated using XML Schema.
      </xs:documentation>
    </xs:annotation>
    <xs:choice>
      <xs:group ref="grpCorrectTrueFalse"/>
      <xs:group ref="grpCorrectMultipleChoice"/>
      <xs:group ref="grpCorrectFillIn"/>
      <xs:group ref="grpCorrectLongFillIn"/>
      <xs:group ref="grpCorrectLikert"/>
      <xs:group ref="grpCorrectMatching"/>
      <xs:group ref="grpCorrectPerformance"/>
      <xs:group ref="grpCorrectSequencing"/>
      <xs:group ref="grpCorrectNumeric"/>
      <xs:group ref="grpCorrectOther"/>
    </xs:choice>
  </xs:complexType>
  <xs:complexType name="interactionType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Reusable type to implements a single interaction record as
        defined in Clause 6.1.9.
      </xs:documentation>
    </xs:annotation>
    <xs:all>
      <xs:element name="identifier" type="longIdentifierType">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            Implements Clause 6.1.9.1: ID
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="type" type="interactionTypeType">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            Implements Clause 6.1.9.2: Type
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="objectiveIds" type="objectiveIdsType"
        minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            Implements Clause 6.1.9.3: Objectives ID
          </xs:documentation>
        </xs:annotation>
        <xs:unique name="uniqueInObjectivesIds">
          <xs:selector xpath="./t:objectiveId"/>
          <xs:field xpath="."/>
        </xs:unique>
      </xs:element>
      <xs:element name="timeStamp" type="dateTimeType" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            Implements Clause 6.1.9.4: Time stamp
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="correctResponses" type="correctResponsesType"
        minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            Implements Clause 6.1.9.5: Correct responses
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="weighting" type="real7Type" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            Implements Clause 6.1.9.6: Weighting
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="learnerResponse" type="learnerResponseType"
        minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            Implements Clause 6.1.9.7: Learner response
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="result" type="interactionResultType"
        minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            Implements Clause 6.1.9.8: Result
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="latency" type="timeIntervalType" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            Implements Clause 6.1.9.9: Latency
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="description" type="localizedString250Type"
        minOccurs="0"/>
    </xs:all>
  </xs:complexType>
  <xs:complexType name="interactionsType">
    <xs:sequence>
      <xs:element name="interaction" type="interactionType"
        minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="collectionType" fixed="bag"/>
    <xs:attribute name="spm" fixed="250"/>
  </xs:complexType>
  <xs:complexType name="learnerPerformanceStepType">
    <xs:all>
      <xs:element name="stepName" type="shortIdentifierType"
        minOccurs="0"/>
      <xs:element name="stepAnswer" minOccurs="0">
        <xs:complexType>
          <xs:choice>
            <xs:element name="literal" type="literalString250Type"
              minOccurs="0"/>
            <xs:element name="numeric" type="real7Type" minOccurs="0"/>
          </xs:choice>
        </xs:complexType>
      </xs:element>
    </xs:all>
  </xs:complexType>
  <xs:complexType name="learnerPreferenceType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implementslearner_preference_type in Clause 6.1.13:
        Learner preference data
      </xs:documentation>
    </xs:annotation>
    <xs:all>
      <xs:element name="audioLevel" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            Implements Clause 6.1.13.1: Audio level
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="real7Type">
            <xs:minInclusive value="0"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="language" type="languageType" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            Implements Clause 6.1.13.2: Language
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="deliverySpeed" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            Implements Clause 6.1.13.3: Delivery speed
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="real7Type">
            <xs:minInclusive value="0"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="audioCaptioning" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            Implements Clause 6.1.13.4: Audio captioning
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="off"/>
            <xs:enumeration value="no_change"/>
            <xs:enumeration value="on"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:all>
  </xs:complexType>
  <xs:complexType name="learnerResponseType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implements Clause 6.1.9.7: Learner response.
        Note: It is up to the implementation to choose the correct
        group or element name to match the interaction type. This
        correspondence cannot be expressed or validated using XML
        Schema.
          </xs:documentation>
    </xs:annotation>
    <xs:choice>
      <xs:group ref="grpResponseTrueFalse"/>
      <xs:group ref="grpResponseMultipleChoice"/>
      <xs:group ref="grpResponseFillIn"/>
      <xs:group ref="grpResponseLongFillIn"/>
      <xs:group ref="grpResponseLikert"/>
      <xs:group ref="grpResponseMatching"/>
      <xs:group ref="grpResponsePerformance"/>
      <xs:group ref="grpResponseSequencing"/>
      <xs:group ref="grpResponseNumeric"/>
      <xs:group ref="grpResponseOther"/>
    </xs:choice>
  </xs:complexType>
  <xs:complexType name="literalString250Type">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implement any literal string with SPM=250
      </xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="literalStringType">
        <xs:attribute name="spm" fixed="250"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="literalString1000Type">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implement any literal string with SPM=1000
      </xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="literalStringType">
        <xs:attribute name="spm" fixed="1000"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="literalString4000Type">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Implement any literal string with SPM=4000
      </xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="literalStringType">
        <xs:attribute name="spm" fixed="4000"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="matchingPairType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        A pair of matched short identifiers for interaction type
        "matching" as specified in 6.1.9.5: Correct response and
        6.1.9.7: Learner response.
      </xs:documentation>
    </xs:annotation>
    <xs:all>
      <xs:element name="source" type="shortIdentifierType"/>
      <xs:element name="target" type="shortIdentifierType"/>
    </xs:all>
  </xs:complexType>
  <xs:complexType name="matchingPairsType">
    <xs:sequence>
      <xs:annotation>
        <xs:documentation xml:lang="en">
          A collection of 0 or more instances of matchingPairType.
        </xs:documentation>
      </xs:annotation>
      <xs:element name="pair" type="matchingPairType" minOccurs="0"
        maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="collectionType" fixed="bag"/>
    <xs:attribute name="spm" fixed="36"/>
  </xs:complexType>
  <xs:complexType name="objectiveIdsType">
    <xs:sequence>
      <xs:element name="objectiveId" type="longIdentifierType"
        minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="collectionType" fixed="array"/>
    <xs:attribute name="spm" fixed="10"/>
  </xs:complexType>
  <xs:complexType name="objectivesType">
    <xs:sequence>
      <xs:element name="objective" type="objectiveType" minOccurs="0"
        maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="collectionType" fixed="set"/>
    <xs:attribute name="spm" fixed="100"/>
  </xs:complexType>
  <xs:complexType name="objectiveType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Reusable type to implement the objective_type record
        defined in Clause 6.1.18
      </xs:documentation>
    </xs:annotation>
    <xs:all>
      <xs:element name="identifier" type="longIdentifierType"/>
      <xs:element name="score" type="scoreType" minOccurs="0"/>
      <xs:element name="status" type="legacyStatusType" minOccurs="0"/>
      <xs:element name="progressMeasure" type="progressMeasureType"
        minOccurs="0"/>
      <xs:element name="completionStatus" type="completionStatusType"
        minOccurs="0"/>
      <xs:element name="successStatus" type="successStatusType"
        minOccurs="0"/>
      <xs:element name="description" type="localizedString250Type"
        minOccurs="0"/>
    </xs:all>
  </xs:complexType>
  <xs:complexType name="responseOtherType">
    <xs:simpleContent>
      <xs:extension base="literalString4000Type"/>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="stepSequenceType">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        A sequence of steps for interaction type "sequencing"
        as specified in 6.1.9.5: Correct response and 6.1.9.7:
        Learner response.
        The same identifier may appear more than once in the list,
        because a step may be repeated in an interaction.
.      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="step" type="shortIdentifierType" minOccurs="0"
        maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="collectionType" fixed="array"/>
    <xs:attribute name="spm" fixed="36"/>
  </xs:complexType>
</xs:schema>

