<!-- Saba Learning Content Format (LCF) DTD
Daniel Lipkin
v1.0
Last Modified 4/24/2000 -->

<!-- Saba Learning Content Format (LCF) describes the assembly of on-line educational material -->

<!-- Common attributes shared by objectives and content elements. -->
<!-- name is a human-readable identifier for the content element.
description is a text description of the content element.
metadataRef is an optional URI to a Catalog Format document containing metadata for the specified element.
lang indicates the language used by the content element using RFC1766.  -->
<!ENTITY % common-attr "id ID #REQUIRED
                        name CDATA #IMPLIED
                        description CDATA #IMPLIED
                        metadataRef CDATA #IMPLIED
                        xml:lang NMTOKEN #IMPLIED">

<!-- Attributes shared by all content elements.  Notice that this includes all the common attributes defined above. -->
<!-- objectiveRef references objectives associated with this content element.
timeAllowed indicates the number of minutes a specific learner is allowed to view the content.  It is mostly intended 
for questions on tests, but may also be applied to any content element.
accessCount indicates the number of distinct time a single learner is allowed to view the content.  If left unspecified, 
there are no restrictions on the number of times the content can be viewed.
isVisible indicates whether or not the content is displayed.
startDate and endDate define a range of time in which a content element may be viewed. 
startDate and endDate are represented using ISO8601 format. -->
<!ENTITY % content-attr "%common-attr;
                         objectiveRef IDREFS #IMPLIED
                         timeAllowed CDATA #IMPLIED
                         accessCount CDATA #IMPLIED
                         isVisible (true | false) 'true'
                         startDate CDATA #IMPLIED
                         endDate CDATA #IMPLIED">

<!-- Attributes shared by all question elements. Notice that this includes all the content attributes defined above. -->
<!-- points defines the number of points a given question is worth.
questionnaire refers to the questionnaires with which this question is associated. 
title associates a title with this question. -->
<!ENTITY % question-attr "%content-attr;
                          points CDATA #IMPLIED
                          questionnaire IDREFS #IMPLIED
                          title CDATA #IMPLIED">

<!-- The different types of tests defined by LCF -->
<!ENTITY % questionnaire-elements "multipleChoice | trueFalse | essay">

<!-- The different types of content defined by LCF.   -->
<!ENTITY % content-elements "text | learningObject | questionnaire">

<!-- An LCF file contains a Table of Contents, followed by zero or more objectives, followed by one or more 
content elements. -->
<!-- An LCF file places all content elements at the top-most level, and uses a Table of Contents to
indicate the structure and nesting of the content elements.  This separation of content from structure
makes it easier to vary them independently, and ensures that deeply nested content does
not require recursive extraction. -->
<!ELEMENT lcf (toc, (objective)*,  (%content-elements; | %questionnaire-elements; )+ )>
<!ATTLIST lcf %content-attr;>

<!-- The type attribute provides a hint as to how the contents of the LCF are to be interpreted.  
A type of "class" means the file defines a single, launchable class.  This
is directly analogous to an IMS Content Packaging file, where each "learningObject"
is an external reference to a physical resource.
A type of "course" means the file defines a course structure.  This is directly
analogous to an ADL Structure Course Format file, where each "learningObject" element is an au.
A type of "questionnaire" means that the file contains an on-line questionnaire only. -->
<!ATTLIST lcf type (class | course | questionnaire) "class">

<!-- A text element is a screen of plain, unformatted text. -->
<!ELEMENT text (#PCDATA )>
<!ATTLIST text %content-attr;>

<!-- An learningObject element is an opaque reference to some form of external learning content, 
identified by the URI value of the href attribute. The supported formats of learningObjects 
is implementation-specific, although support for common web formats such as HTML documents and
JPEG images is recommended. -->
<!ELEMENT learningObject EMPTY>
<!ATTLIST learningObject %content-attr;
                   href CDATA #REQUIRED>

<!-- A questionnaire consists of optional introductory text, followed by one or more questions.  Questions can be 
multipleChoice, trueFalse, or essay.

A questionnaire has a type attribute to specify the context in which the questionnaire is used.

A questionnaire contains one or more scorebands that specify score ranges.

There are two ways to specify the contents of a questionnaire:

1.  Use the toc structure to indicate the exact order in which questionnaire qustions are presented.
2.  Use the"questionnaire" attribute to indicate the questionnaire to which question belongs, and set a numeric 
value for the
     "randomize" attribute of the questionnaire.  The specified number of questions will be displayed in
     random order.
-->
<!ELEMENT questionnaire (scoreband)*>
<!ATTLIST questionnaire %content-attr;
						type (test | survey | assessment) "test">
						
<!-- passingScore is a simple mechanism to indicate a passing score for a test.  Tests may also employ
scorebands to capture more sophisticated scoring ranges. -->
<!ATTLIST questionnaire passingScore CDATA #IMPLIED>

<!-- resumable specifies whether or not the questionnaire state can be saved so it may be resumed at a later time. -->
<!ATTLIST questionnaire resumable (true | false) #IMPLIED>

<!-- displayType specifies whether questions are presented on separate web pages or on a single page. -->
<!ATTLIST questionnaire displayType (together | separate) "separate">

<!-- randomize specifies whether questions should be presented in random order.  It contains the number
of questions to present.  If a value for randomize is not specified, all questions are presented in order. -->
<!ATTLIST questionnaire randomize CDATA #IMPLIED>

<!-- warningTime specifies whether a warning should be presented prior to the end of the questionnaire.  It contains 
the number of minutes before the end of the test at which the warning appears. -->
<!ATTLIST questionnaire warningTime CDATA #IMPLIED>

<!-- A scoreband has a required numeric upper bound and lower bound.  It also has optional feedback text content. -->
<!ELEMENT scoreband (text)?>
<!ATTLIST scoreband id ID #REQUIRED
                    lowerBound CDATA #REQUIRED
                    upperBound CDATA #REQUIRED>

<!-- A multiple choice question consists of a question followed by one or more choices, followed by optional hints.  In practice, there will be at least three choice. -->
<!ELEMENT multipleChoice (question, choice+, hints?)>
<!ATTLIST multipleChoice %question-attr;>

<!-- A question contains one or more text or external content elements.  -->
<!ELEMENT question (text | learningObject)+>

<!-- The hints element contains one or more hints.  The "type" attribute specifies how hints are presented.  "Incremental" means that all hints up and to including the current request are presented; "multilevel" means that only the hint element corresponding to the number of time a hint has been requested is displayed. -->
<!ELEMENT hints (hint+)>
<!ATTLIST hints type (incremental | multilevel) "multilevel">

<!-- The text of a hint. -->
<!ELEMENT hint (#PCDATA)>
<!ATTLIST hint xml:lang NMTOKEN #IMPLIED>

<!-- One of the possible answers.  At least one of the choices must have a value of "true" for the "answer" attribute. -->
<!ELEMENT choice (#PCDATA)>
<!ATTLIST choice xml:lang NMTOKEN #IMPLIED
                 answer (true | false) "false">

<!-- A True or False question.  The "answer" attribute specifies the correct answer for this question. -->
<!ELEMENT trueFalse (question, hints?)>
<!ATTLIST trueFalse %question-attr;
                    answer (true | false) #REQUIRED>

<!-- An essay question. -->
<!ELEMENT essay (question, hints?)>
<!ATTLIST essay %question-attr;>

<!-- Objectives are statements of skills, knowledge, and attitudes to be acquired by the student.  Each objective has an ID, and optional name and description.  Objectives may be nested. -->
<!ELEMENT objective (objective*)>
<!ATTLIST objective %common-attr;>

<!-- toc definition is based on the Table of Contents structures from IMS Content Packaging.  
It is used to specify the structure used to present content elements.  -->
<!-- The toc (table of contents) is the root element -->
<!ELEMENT toc (item+)>

<!-- The item elements can be nested within each other to convey organizational structure.  
The title attribute defines the title of this entry.  
The ref attribute refers to a content element within the file. -->
<!ELEMENT item (item)*>
<!ATTLIST item title CDATA #IMPLIED>
<!ATTLIST item ref IDREF #IMPLIED>

