Trivantis Lectora XML Specification v2007

 2007 Trivantis Corporation, All rights reserved

311 Elm Street • Suite 200

CincinnatiOH, 45202

Phone 513.929.0188 • Fax 513.929.0770

Lectora XML SPECIFICATION

Table of Contents

Lectora XML SPECIFICATION

Core File Structure

Changes for Lectora 2007

<titledata> element

<currentid> element

<authorpassword> element

<guide> element

<resourcedata> element

resource > element

<name> element

<relativelink> element

<variabledata> element

variable > element

<name> element

<initialvalue> element

<reserved_variable> element

<autoscore_variable> element

<automatic_variable> element

<readonly_variable> element

<form_variable> element

<question_variable> element

<randominit_variable> element

<lastupdated> element

<objectdata> element

<title> element

<name> element

<bgcolor> element

<textcolor> element

<width> element

<height> element

<font> element

<height> element

<width> element

<escapement> element

<orientation> element

<facename> element

<rowheight> element

<colwidth> element

<supportfile> element

<linkcolor> element

<lastupdated> element

<transitionin> element

<transype> element

<delay> element

<speed> element

<frame> element

<name> element

<bgcolor> element

<textcolor> element

<width> element

<height> element

<leftframe> element

<rightframe> element

<topframe> element

<bottomframe> element

<linkcolor> element

<lastupdated> element

<transitionin> element

<chapter> element

<name> element

<bgcolor> element

<textcolor> element

<width> element

<height> element

<excluded> element

<linkcolor> element

<lastupdated> element

<transitionin> element

<name> element

<bgcolor> element

<textcolor> element

<width> element

<height> element

<excluded> element

<linkcolor> element

<lastupdated> element

<transitionin> element

<page> element

<name> element

<bgcolor> element

<textcolor> element

<width> element

<height> element

<excluded> element

<linkcolor> element

<lastupdated> element

<transitionin> element

<assignableunit> element

<name> element

<bgcolor> element

<textcolor> element

<width> element

<height> element

<excluded> element

<autype> element

<maxscore> element

<masteryscore> element

<maxtimeallowed> element

<developerid> element

<description> element

<linkcolor> element

<lastupdated> element

<transitionin> element

<prereq> element

<question> element

<name> element

<bgcolor> element

<textcolor> element

<width> element

<height> element

<questiontext> element

<numchoices> element

<maxlength> element

<feedbacktext> element

<feedbackcorrect> element

<feedbackincorrect> element

<answer> element

<choice> element

<choicetext> element

<feedbacktext> element

<point> element

<x> element

<matchingpair> element

<leftcolumn> element

<choicetext> element

<answer> element

<rightcolumn> element

<choicetext> element

<test> element

<name> element

<bgcolor> element

<textcolor> element

<width> element

<height> element

<resultstring> element

<subjectstring> element

<time> element

<numberrandomquestions> element

<passinggrade> element

<linkcolor> element

<lastupdated> element

<transitionin> element

<testsection> element

<name> element

<bgcolor> element

<textcolor> element

<width> element

<height> element

<numberrandomquestions> element

<linkcolor> element

<lastupdated> element

<transitionin> element

<testresults> element

<name> element

<bgcolor> element

<textcolor> element

<width> element

<height> element

<linkcolor> element

<lastupdated> element

<transitionin> element

<survey> element

<name> element

<bgcolor> element

<textcolor> element

<width> element

<height> element

<resultstring> element

<subjectstring> element

<linkcolor> element

<lastupdated> element

<transitionin> element

<action> element

<name> element

<delay> element

<delayms> element

<timerinterval> element

<actionitem> element

<targetstring> element

<conditionlist> element

<condition> element

<stringcomparison> element

<windowname> element

<windowwidth> element

<windowheight> element

<windowposx> element

<windowposy> element

<noscrollbars> element

<nomenubar> element

<notoolbar> element

<noresize> element

<nostatus> element

<nolocation> element

<randval1> element

<randval2> element

<lastupdated> element

<text> element

<name> element

<rect> element

<left> element

<top> element

<right> element

<bottom> element

<rtf> element

<bgcolor> element

<reference> element

<refauthor> element

<reftitle> element

<refpub> element

<refdate> element

<flyin> element

<flyfrom> element

<delay> element

<speed> element

<flyout> element

<flyto> element

<delay> element

<speed> element

<bgcolor> element

<bordercolor> element

<outlinecolor> element

<bordersize> element

<marginsize> element

<lastupdated> element

<possize> element

<point> element

<x> element

<y> element

<size> element

<cx> element

<cy> element

<transitionin> element

<transype> element

<delay> element

<speed> element

<transitionout> element

<transype> element

<delay> element

<speed> element

<image> element

<name> element

<rect> element

<left> element

<top> element

<right> element

<bottom> element

<reference> element

<refauthor> element

<reftitle> element

<refpub> element

<refdate> element

<lastupdated> element

<creatorshapeutildata> element

<animimage> element

<name> element

<rect> element

<left> element

<top> element

<right> element

<bottom> element

<reference> element

<refauthor> element

<reftitle> element

<refpub> element

<refdate> element

<lastupdated> element

<param> element

<name> element

<value> element

<video> element

<name> element

<rect> element

<left> element

<top> element

<right> element

<bottom> element

<reference> element

<refauthor> element

<reftitle> element

<refpub> element

<refdate> element

<url> element

<mediaevent> element

<name> element

<value> element

<lastupdated> element

<audio> element

<name> element

<rect> element

<left> element

<top> element

<right> element

<bottom> element

<reference> element

<refauthor> element

<reftitle> element

<refpub> element

<refdate> element

<url> element

<lastupdated> element

<button> element

<name> element

<rect> element

<left> element

<top> element

<right> element

<bottom> element

<lastupdated> element

<creatorbuttonwizdata> element

<toc> element

<name> element

<rect> element

<left> element

<top> element

<right> element

<bottom> element

<bgcolor> element

<textcolor> element

<lastupdated> element

<referencelist> element

<name> element

<rect> element

<left> element

<top> element

<right> element

<bottom> element

<lastupdated> element

<document> element

<name> element

<rect> element

<left> element

<top> element

<right> element

<bottom> element

<reference> element

<refauthor> element

<reftitle> element

<refpub> element

<refdate> element

<lastupdated> element

<ipix> element

<name> element

<rect> element

<left> element

<top> element

<right> element

<bottom> element

<reference> element

<refauthor> element

<reftitle> element

<refpub> element

<refdate> element

<ipixsupportfile> element

<lastupdated> element

<other> element

<name> element

<rect> element

<left> element

<top> element

<right> element

<bottom> element

<class> element

<html> element

<param> element

<name> element

<value> element

<supportfile> element

<lastupdated> element

<form> element

<name> element

<submitstring> element

<subjectstring> element

<param> element

<name> element

<value> element

<lastupdated> element

<radiogroup> element

<name> element

<condmsg> element

<lastupdated> element

<radio> element

<name> element

<rect> element

<left> element

<top> element

<right> element

<bottom> element

<condmsg> element

<label> element

<lastupdated> element

<checkbox> element

<name> element

<rect> element

<left> element

<top> element

<right> element

<bottom> element

<condmsg> element

<label> element

<lastupdated> element

<entryfield> element

<name> element

<rect> element

<left> element

<top> element

<right> element

<bottom> element

<condmsg> element

<default> element

<lastupdated> element

<listbox> element

<name> element

<rect> element

<left> element

<top> element

<right> element

<bottom> element

<condmsg> element

<listitem> element

<itemtext> element

<lastupdated> element

<droplist> element

<name> element

<rect> element

<left> element

<top> element

<right> element

<bottom> element

<condmsg> element

<listitem> element

<itemtext> element

<lastupdated> element

<objquestion> element

<name> element

<questiontext> element

<maxlength> element

<feedbacktext> element

<feedbackcorrect> element

<feedbackincorrect> element

<answer> element

<objchoice> element

<choicetext> element

<feedbacktext> element

<centerpoint> element

<x> element

<dropdistwidth> element

<dropdistheight> element

<objmatchingpair> element

<leftcolumn> element

<choicetext> element

<rightcolumn> element

<choicetext> element

<lastupdated> element

<questionweight> element

<surveyobjquestion> element

<name> element

<questiontext> element

<maxlength> element

<testtimer> element

<name> element

<rect> element

<left> element

<top> element

<right> element

<bottom> element

<lastupdated> element

<menu> element

<name> element

<rect> element

<left> element

<top> element

<right> element

<bottom> element

<bgcolor> element

<textcolor> element

<bghlcolor> element

<texthlcolor> element

<separatorcolor> element

<outlinecolor> element

<menuitem> element

<name> element

<horizxmargin> element

<horizymargin> element

<vertxmargin> element

<vertymargin> element

<lastupdated> element

<equation> element

<name> element

<rect> element

<left> element

<top> element

<right> element

<bottom> element

<lastupdated> element

<objgroup> element

<name> element

<lastupdated> element

<note> element

<name> element

<color> element

<notetext> element

<notepos> element

<floatpos> element

<floatsize> element

<createtime> element

<createname> element

<lastupdated> element

<progressbar> element

<name> element

<rect> element

<left> element

<top> element

<right> element

<bottom> element

<color> element

<bgcolor> element

<step> element

<range> element

<ticktime> element

<totaltime> element

<lastupdated> element

<trquestiongroup> element

<name> element

<lastupdated> element

Lectora DTD

Sample Lectora XML Output

Lectora XML specification

Introduction

The Trivantis Lectora XML Specification describes the basic structure of a Lectora title represented in XML format. This document is intended to assist in both creating XML files to be imported into Lectora, as well as exporting Lectora generated XML into other environments. This document assumes a working knowledge of Lectora and the elements of a Lectora title.

Core File Structure

The root element of a Lectora XML file is lectoratitle. This element is subdivided into four main parts, titledata, resourcedata, variabledata, and objectdata. These four core elements comprise all aspects of a Lectora title.

Figure 1 Core Lectora file layout

The titledata section consists of elements that pertain to the entire title. The resourcedata section is an array of all external resources used in the title. Things such as GIF files, JPEG files, and AVI files would be listed in the resources section. The variabledata section is an array of all of the user defined variables for the title. The objectdata section is an array of all of the objects within the title. This includes all of the chapters, pages, test and questions, as well as the individual object references such as buttons, text blocks and images.

The most important concept in a Lectora XML document is the id attribute. All of the resources, variables and objects are linked together through their id attribute, which is a unique identifier throughout the document.

Each of these elements is discussed in detail in the next chapter.

Changes for Lectora 2007

Many updates have been made to the Lectora XML specification for Lectora 2007. They are:

  • The addition of the <testresults>, <survey>, <surveyobjquestion>, <progressbar> and <trquestiongroup> elements representing new object types.
  • The addition of the <randominit_variable> element to the variable element. This new element is a flag indicating that the initial value of the variable is randomly initialized upon starting Lectora.
  • New value of timer for the on attribute of the <action> element.
  • The addition of the <elseactionitem> and <timerinterval> elements to the <action> element.
  • New values of moveto, sizeto, processquestion, resetquestion, flash command, stepprogress, and setprogress for the actiontaken attribute of the <actionitem> element.
  • The addition of the new command attribute to the <actionitem> element.
  • The target attribute of the <actionitem> element has a new value of currpage.
  • The addition of the <name>, <possize>, <randval1>, <randval2> and <value> elements to the <actionitem> element.
  • The addition of <isempty> and <isnotempty> as values for the <comparecondition> attribute of a <condition> element.
  • The addition of the new defaulttext, wrapobjects, verticalscroll, textblocktype, and labelobject attributes to the <text> element.
  • The addition of the new <mediaevent> element to the <video> and <audio> elements.
  • The display attribute of the <audio> element has a new value of newimage.
  • The addition of the new imgresource attribute to the <audio> element.
  • The scope attribute of the <toc> element has a new value of test.
  • The addition of the new header and footer attributes to the <objgroup> element.

Detailed XML Binding

<titledata> element

Description: The <titledata> element defines a few items common to the entire title.

Multiplicity: The <titledata> element can occur only once in each Lectora title.

Attributes:

  • titletype – An optional enumeration describing the contents of the title. It can have the following values:

standard

coursemill

aicc

Both SCORM and AICC courses should be set to aicc. This setting causes the variables specific to those types of titles to be available. If the attribute is not specified, the default is standard.

  • publishcdfullscreen – An optional boolean enumeration (true/false). If the attribute is not specified, the default is false. Setting this attribute causes a title published to CD to have a maximized window covering the entire screen.

Elements:currentid, authorpassword, guide

<currentid> element

Description: The <currentid> element defines the next sequential unique identifier to be used in the title. It must be numeric and greater than any IDs in the title. The next object created in the title will get this ID, and then the number will be incremented.

Multiplicity: The <currentid> element can occur only once within each <titledata> element.

Attributes: None.

Elements: None.

<authorpassword> element

Description: The <authorpassword> element defines the password used to restrict access to the modification of the title.

Multiplicity: The <authorpassword> element can occur only once within each <titledata> element.

Attributes: None.

Elements: None.

<guide> element

Description: The <guide> element is an empty element that defines a horizontal or vertical line placed on the Lectora pages that can be used as a guide to align objects on the page..

Multiplicity: The <guide> element can occur only once within each <titledata> element.

Attributes:

  • type – An optional enumeration defining the guide type. If the attribute is not specified, the default is horz. It can have the following values:

horz – This indicates that the guide is horizontal.

vert – This indicates that the guide is vertical.

  • val – The X (for a vertical guide) or Y (for a horizontal guide) coordinate position of the guide line.

Elements: None.

<resourcedata> element

Description: The <resourcedata> element defines links to external resources included in the title. It consists of an array of <resource> elements.

Multiplicity: The < resourcedata > element can occur only once in each Lectora title.

Attributes: None.

Elements:resource

resource > element

Description: The <resource> element defines a link to an external file used by the title.

Multiplicity: The <resource> element can occur zero or more times within a <resourcedata> element.

Attributes:

  • id – The required unique numeric identifier for the resource element.
  • resourcetype – A required enumeration defining the type of the resource. It can have the following values:

document – defines a link to a text or RTF file for a document object

animation – defines a link to an animated GIF file for an animation object

image – defines a link to a JPEG, BMP, GIF, or TIF file for an image object

video – defines a link to a MPG, AVI, or MOV file for a video object

audio – defines a link to a WAV, MIDI, or MP3 file for an audio object

ipix – defines a link to an IPX file for a ipix object

ipixsupportfile – defines a link to a support file for an ipix object

other – defines a link to a resource used by an external HTML object

othersupportfile – defines a link to a support file used by an external HTML object

Elements:name, relativelink

<name> element

Description: The <name> element defines the name of the resource that is seen by the user of Lectora.

Multiplicity: The <name> element can occur only once within each <resource> element.

Attributes: None.

Elements: None.

<relativelink> element

Description: The <relativelink> element defines the actual file system link to a resource, relative to the title. For example, if you were to have a link to a JPEG image file named myimage.jpg in a subdirectory called images under the title directory, this element would have the value images\myimage.jpg.

Multiplicity: The <relativelink> element can occur only once within each <resource> element.

Attributes: None.

Elements: None.

<variabledata> element

Description: The <variabledata> element defines all of the variables for the title. It consists of an array of <variable> elements.

Multiplicity: The <variabledata> element can occur only once within each Lectora title.

Attributes: None.

Elements:variable

variable > element

Description: The <variable> element defines a single variable in the title.

Multiplicity: The <variable> element can occur zero or more times within a <variabledata> element.

Attributes:

  • id - The required unique numeric identifier for the variable element.
  • referenceobjectid – The optional ID of the object that this variable references. This is used for test score variables. It would contain the ID of the test referenced by the variable.

Elements:name, initialvalue,reserved_variable, autoscore_variable, automatic_variable, readonly_variable, form_variable, randominit_variable, lastupdated

<name> element

Description: The <name> element defines the name of the variable that is seen by the user of Lectora.

Multiplicity: The <name> element can occur only once within each <variable> element.

Attributes: None.

Elements: None.

<initialvalue> element

Description: The <initialvalue> element defines the value of the variable when the title is first loaded.

Multiplicity: The <initialvlue> element can occur only once within each <variable> element.

Attributes: None.

Elements: None.

<reserved_variable> element

Description: The <reserved_variable> element is an empty element that acts as a flag indicating that the variable’s value is set by the title. Internally created test score variables should have this flag.

Multiplicity: The <reserved_variable> element can occur only once within each <variable> element.

Attributes: None.

Elements: None.

<autoscore_variable> element

Description: The <autoscore_variable> element is an empty element that acts as a flag indicating that the variable represents a test score. One variable is created for each test in the title, and the variable is set/updated whenever the student completes the associated test.

Multiplicity: The <autoscore_variable> element can occur only once within each <variable> element.

Attributes: None.

Elements: None.

<automatic_variable> element

Description: The <automatic_variable> element is an empty element that acts as a flag indicating that Lectora automatically creates the variable. Internally created test score variables should have this flag.