Help - Text - Browse

JTLanguage help browser.

Markup Reference

Table of Contents

Introduction
Strings
Variables
References
Extension Elements
Insert
If
Foreach
For
Generate
Say
Pause
Item
Each
Duration
Play
Study
StudyItem
Choose
Choice
View
Show
Hide
Loop
Marker
Learning

Introduction

The markup format mechanism allows you to create your own lesson or lesson component page layout, allowing you to display content from the lesson how you wish, including boiler-plate stuff that is the same for each lesson, as well as content that will change from lesson to lesson.

The markup format mechanism also allows you to generate audio files containing lesson content, put together in ways specified by the markup. It is also used as the basis for the "Automated" study mechanism.

The markup format is basically HTML (internally XML) plus some additional elements specific to JTLanguage, plus some special substitution markers for displaying text and lesson content. A special requirement is that all elements must be closed. For example, all <p> tags must have a closing </p> tag. If you don't know HTML, here's a reasonable place to start: http://www.w3schools.com/html/

At the top level, it can be a standard <html><head></head><body></body></html> form, in which case only the content of the body element is used, or it can be a single <markup></markup>, element, in which case only the content of the markup element is used.

When the markup text is rendered, the standard HTML elements are passed right on through. The JTLanguage-specific elements, however, get substituted for lesson or other content, perhaps with some additional HTML elements embedded, based on the element type. The rendered output is pure HTML that is then embedded in a JTLanguage web page. Because of this, care must be taken to use proper HTML elements and structuring, as otherwise the whole page might generate an error and be messed up or not display at all.

When used for generating audio files (via the "Generate media" link on the audio content media player pages), the markup information is used to output spoken text to the generated file. The text either comes from the text or strings embedded in the markup information, or from study list content. If the text doesn't have any associated audio file, the generator will try to use voice synthesis to generate the audio speech file for the text. For the former, the markup editing mechanism has features for letting you pre-generate or upload the audio files for the embedded text or strings.

When used for the "Automated" study mechanism (via a content page configuration to have the "Automated" content type), the markup information acts like a scripting language, playing back audio for text as it is encountered. Like the "Generate" mechanism, if pre-recorded or pre-generated audio files are not present, the "Automated" mechanism will try to generate them on-the-fly using speech synthesis. Alternatively (via the "Edit automated template" link on the "Automated" content page), you can pre-generate the speech audio files for the embedded strings, or you can use the markup editing mechanism to pre-generate or upload audio files for the embedded text or strings.

For both the "Generate" and "Automate" mechanisms, you can associate either a locally-stored markup template with the content object, or you can reference a shared markup template managed under the "Teacher" menu. If no markup template is referenced, a default format will be used. For convenience, you can edit the markup template information directly from the "Generate media" or "Edit automated template" pages. After making any changes to the markup template text, be sure to click the "Save" button under the edit box to save your changes.

The following sections describe the different things that make up the markup template language.

Strings

Because the rendered markup text might need to be in different languages, there needs to be a way to represent this in your markup text. For text that is not lesson content but just serves as boilerplate text or headings, you can use "{}" substitutions. The text inside the "{" and "}" markers should be the text you want rendered in your UI language, or in the string display language specified in the lesson master content item. These strings are stored with the markup template, and can be edited via the "Strings" tab of the "Markup Template" page in JTLanguage.

When these markers are encountered during rendering, they will be subsituted with text for the language place-holder specified in the "StringDisplayLanguage" option of the markup template. If the current UI language is the same as that of the markup text's author, and the "StringDisplayLanguage" option is "UI", the text inside the "{" and "}" markers is used. Otherwise the renderer looks up the translation in the string table stored in the markup template. The "StringLanguage" option can be one of: UI, Host, or Target, corresponding to the current user's profile and language settings. If the text for the user's UI language has not been set, the teacher's UI language text is displayed.

For example, given that my UI language is English, suppose I have set the markup template's "StringDisplayLanguage" to "UI", and I want to display an H2 heading in the users UI language. I could do this:

<h2>{My Heading}</h2>

Then when a user using English as his UI language sees a page using this template, he will see:

My Heading


If my markup template supports Chinese, meaning I included that language in the markup template's info page and entered Chinese text for the strings in the string table, then when a Chinese user comes along, he will see:

我的标题


Alternatively, by setting the "StringDisplayLanguage" option to "Target", the strings will display in the user's target language.

Variables

Variables are another form of substitution, and like strings, they use the "{" and "}" markers. Some of the JTLanguage extension elements are iterative, and can specify a variable to be used to display the iterated value. For example, if there is a variable name giving in an enclosing JTLanguage element, and the current value of the variable is "My Value", the following:

{MyVariableHeading}

will be replaced with:

My Value

References

References are yet another form of substitution, and can be used to substitute lesson content and other things. They use the "$(" and ")" markers. The content between the markers tells JTLanguage what to substitute and where to get it from. This is one area where the markup text begins to look like a programming language. The following are some possible forms when the markup template is used in a lesson:

Reference Form Description
$(content) The reference is replaced by lesson content with either a key value or content type name of "content". In the case where a subtype is used, the content could instead be a placeholder of "Course" (or "Tree") to reference the course, or "Lesson" (or "Node") to reference the current node, which is either a lesson or group.
$(content[index]) The reference is replaced by a lesson content item with either a key value or content name of "content", and an index given by "index", which can be a number, tag attribute name, or variable reference (in the form of "{variablename}"). If the content type is for any of the text contents, the index indicates which text item to substitute. Because no language is specified, all the indexed items of the user's set languages are used.
$(content[index, count]) The reference is replaced by a ranged of lesson content items with either a key value or content name of "content", a start index given by "index", which can be a number, tag attribute name, or variable reference (in the form of "{variablename}"), and a count of items that can also be a number, tag attribute name, or variable reference. Because no language is specified, all the items of the user's set languages are used.
$(content[index].language) The reference is replaced by an indexed or tagged lesson content item of the specified language. The "language" term indicates a single language to use, represented by one of the place-holders "Host" or "Target", plus an optional index number base 0, if you want to select from multiple host or target languages. These can also be abbreviated as "h" or "t", plus the optional index number. Some examples: "Target", "target0", "h". Note that letter case is ignored here. Alternatively a standard language code can be use here to specify a language directly, for example, "en" for English. (See http://msdn.microsoft.com/en-us/library/ms866170.aspx for a list of these codes.)
$(content[tag]) The reference is replaced by all the lesson content items referenced by the key value or content name of "content", which have an attach "Tag" attribute with a value of "tag", plus the following items with either no tag, or the same tag. Note that the value of a tag annotation must not be a number, as otherwise it will be considered an index when referenced.
$(content.subtype) This form of the reference is for accessing some other attribute of the referenced content, such as the title, description, content index, number of items, etc. See the table below for a list of subtype names.
$(content[index].subtype) This form of the reference is for accessing some other attribute of the referenced and indexed content, such as the text, speaker name, language, media, audio, picture, or index of the item. See the table below for a list of subtype names.
$(content.subtype.subsubtype) This form of the reference is for accessing some other attribute of the referenced and indexed content, specified by both the subtype and subsubtype names given. This is only supported by some of the subtypes. For example, if the subtype is "Option", the subsubtype should be an option name. In this case, by option, I mean a user-specified option that is added to a lesson or content component. So this is a place-holder for values specific to individual lessons or content components. Alternatively, for attributes that are multi-language, such as Title or Description, the subsubtype can be a language designator as described above.
$(content[index](option[,option=value[,...]])) This form of the reference is for specifying additional options for selecting how to format or what to include or not to include in displaying the item. See the table below for a list of option names. The options can be option names, or option=value pairs. Some options take boolean values (true, false, yes, no, on, off) and some take other values.
$(subtype) If no recognized content key or type is specified, the document itself is implied as the content, and the subtype specifies the document attribute to display, or the attribute pertains to the current user, such as the UI, host, or target languages.
$(content[index].language[sentenceindex]) An indexed sentence of the specified language item paragraph is displayed.

In addition to lesson content keys or content types, the content and subtype values can also be the following:

Key Description SubSubTypes
Title The content title. Host, Target, Target1, ...
Description The content description. Host, Target, Target1, ...
Key The content key.
Label The content label.
Owner The content owner user ID.
Index The content index, or if an index is specified, the index of the content text item.
IsPublic The content IsPublic flag (evaluates to "true" or "false").
Package The content package name.
CreationTime The content creation date and time.
ModifiedTime The date and time that the content was last modified.
Option An option value. The option name key.
Count The number of text items in the content, if no index is give, or the number of language items if no language is specified, or the number of sentences, if an index and language is specified.
UI The name of the current UI language. Language, LanguageOnly, LanguageCultureExtension, LanguageCode, CultureCode, ExtensionCode, LanguageCultureExtensionCode
Host The name of the current host language. Language, LanguageOnly, LanguageCultureExtension, LanguageCode, CultureCode, ExtensionCode, LanguageCultureExtensionCode
Host0..3 The name of the current indexed host language. Language, LanguageOnly, LanguageCultureExtension, LanguageCode, CultureCode, ExtensionCode, LanguageCultureExtensionCode
Target The name of the current target language. Language, LanguageOnly, LanguageCultureExtension, LanguageCode, CultureCode, ExtensionCode, LanguageCultureExtensionCode
Target0..3 The name of the current indexed target language. Language, LanguageOnly, LanguageCultureExtension, LanguageCode, CultureCode, ExtensionCode, LanguageCultureExtensionCode
Media Display picture or controls for audio media attached to an item. (Only for a text or sentence item.)
Audio Display controls for audio media attached to an item. (Only for a text or sentence item.)
Picture Display picture attached to an item. (Only for a text or sentence item.)
Text Display the text of an item. (Only for a text or sentence item.)
SpeakerName Display the speaker name of an item. (Only for a text item.)
SpeakerIndex Display the index of the speaker of an item. (Only for a text item.)
LanguageID, LanguageCode Display the language code of an item. (Only for a text or sentence item.)
Language, LanguageName Display the language name of an item. (Only for a text or sentence item.)

The following table lists the available options:

Option Description Values
LanguageFormat Specifies whether language items are mixed together or separated. Mixed (default), Separate
Mixed Specifies that language items are mixed together, target languages first, then host. (no value)
Separate Specifies that language items are displayed separately, grouped according to language. (no value)
RowFormat Specifies whether text items are displayed as paragraphs or separate sentences. Paragraphs (default), Sentences
Paragraphs Specifies that text items are displayed as paragraphs. (no value)
Sentences Specifies that text items are displayed as separate sentences. (no value)
DisplayFormat Specifies whether vocabulary content is displayed in table or list formmat. Table (default), List
Table Specifies that vocabulary content is displayed in table format. (no value)
List Specifies that vocabulary content is displayed in table format. (no value)
ShowAnnotations Specifies whether annotations are displayed, if present. True, False, Yes, No, On, Off (default true)
HideAnnotations, NoAnnotations Specifies that annotations are not to be displayed. (no value)
UseAudio Specifies whether play controls for audio media is displayed, if audio is attatched to items. True, False, Yes, No, On, Off (default true)
NoAudio Specifies that no play controls will be displayed. (no value)
UsePicture Specifies whether pictures associated with items are displayed. True, False, Yes, No, On, Off (default true)
NoPicture Specifies that no pictures will be displayed. (no value)
UseMedia Specifies whether play controls for audio media and attached pictures are displayed, if these are attatched to items. True, False, Yes, No, On, Off (default true)
NoMedia Specifies that no play controls or pictures will be displayed. (no value)
ElementType Specifies which HTML element in which to wrap the overall item or group. span (default), div, td, tr, table
Style Specifies an HTML style attribute value to be attached to the HTML element wrapping the overall item or group. (HTML "style" attribute value)
Class Specifies a CSS class name to be attached to the HTML element wrapping the overall item or group. (a class name attribute value from an CSS file include by this web site, or embedded in the markup.)

Some examples:

Reference Example Description
$(Text) The reference is replaced by some HTML representing the entire text content, including any associated annotations or media.
$(Text[0]) The reference is replaced by some HTML representing the first item in the first content with the content key or content type of "Text", displayed in all the currently enabled languages, and including any attached annotations or media.
$(Text[MyTag]) The reference is replaced by some HTML representing a range of the items in a text content, where the first item has an attached "Tag" attribute with the value "MyTag", displayed in all the currently enabled languages.
$(Words[{index}]) The reference is replaced by some HTML representing a word in the first word vocabulary content indexed by the current variable value of "index", and displayed in all the currently enabled languages.
$(Text[{index}].Target) The reference is replaced by some HTML representing a paragraph in the first text content indexed by the current variable value of "index", and displayed in the user's target language.
$(Text.Count) The reference is replaced by the number of paragraphs in the text content.
$(Text.Title) The reference is replaced by the the title of the first text content, in the current UI language.
$(Lesson.Title) The reference is replaced by the the title of the lesson, in the current UI language.
$(Text.Title.Target) The reference is replaced by the the title of the first text content, in the user's target language.
$(Text[1].Media) The reference is replaced by some HTML representing any pictures or play controls for audio media attached to the second item in the text content.
$(Text[1](ShowAnnotations=false, NoMedia, ElementType=td, Class=tdborderless, Style=color: red)) The reference is replaced by some HTML representing the text of the second item in the text content, without displaying any annotations, play controls, or pictures, and wrapped in a "td" element with a class attribute of "tdborderless".

Extension Elements

The markup extension elements are the other area where the markup template text starts looking like a programming language. They use the standard XML form: <elementname attributename="attributevalue" ...>content</elementname>

Note that element and attribute names are not case-sensitive. Attribute values might or might not be case sensitive in some cases.

The following summarizes the extension elements for textual substitution:

Element Name Description
insert The "insert" element is an alternate way of specifying a substitution, where the insert element will be replaced by the item described by the insert element attributes.
if The "if" element is a way of only conditionally rendering the content of the if element, which can be text or other elements, extension or HTML. The attributes describe the operands and condition which are used to decide if the rendering should be done.
foreach The "foreach" element is a way of iteratively rendering the content of the element, doing a substitution using the items of a specified content or list of values.
for The "for" element is for doing a more traditional iteration over a range of numbers, doing a substitution for the current number when a variable reference whose name was given in the attributes is encountered.

The following summarizes the extension elements for audio generation substitution:

generate The "generate" element is for use with the lesson media generator mechanism. Its contents describe how to generate an audio media file, when used with a media lesson component. If used in a document or textural lesson component, its output when rendered will be a transcript similar to what would be found in the audio version.
say The "say" element is used only for generating audio lesson media for speaking or writing the name of some content field.
pause The "pause" element is used only for generating audio lesson media for appending a period of silence in the audio output file.
item The "item" element is used only for generating audio lesson media from one or more language items from the current textual lesson component.
each The "each" element is used only for generating audio lesson media from all or a specified range of language items from the current working set of items.
duration The "duration" element is used only for generating audio lesson media from all or a specified range of language items from the current working set of items, up to a given time duration.

The following summarizes the extension elements that work for one or more of the text markup, audio generation, or the automated mechanisms:

play The "play" element displays a media player for playing the media for an existing media or study item.
study The "study" element displays a study tool page such as the flash tool page.
studyitem The "studyitem" element display the flash tool card sides for a single study item.
choose The "choose" element displays one or more buttons for choosing among different possibilities represented by "choice" child elements.
choice The "choice" element displays a button for choosing a particular sub view or command, represented either by the child elements of the "choice" element, or its attributes.
view The "view" wraps its child elements such that they can be displayed or hidden. Some external control will enable or disable the display of the view, such as "choice", "show", or "hide" elements or command.
show The "show" element enables the display of the referenced "view" element's contents.
show The "Hide" element disables the display of the referenced "view" element's contents.
loop The "loop" element is used only for the automated mechanism for repeating indefinitely (until the script is stopped) the scripting in its child elements.
marker The "marker" element is used only for the automated mechanism for marking a section of the script for a starting point or goto target.

The following subsections describe these elements in more detail.


Insert

The "insert" element is an alternate way of doing a substitution. It functions like a reference item described above, except that its an element with attributes specifying what to display and how to display it. The syntax:

<insert attributeName="attributeValue" ... />

Note that attribute values can also be {variableName} or $(reference) values, for a kind of preliminary substitution.

The attributes:

Attribute Name Description Values
content This is for specifying a content component for the substitution, where the value is the content key, content type, object type, name, or label. I.e. Text, Transcript, Words, Sentences, Notes, etc., or "This" for the current content.
subtype This is for accessing some other attribute of the referenced content, such as the title, description, content index, number of items, etc. (See the table here for a list of subtype names.)
subsubtype This is for accessing a sub-attribute attribute of an attribute of the referenced content. (See the table here for a list of subtype names and a description of the subsubtypes that go with them.)
language This is for a language or language place-holder name, for selecting which language to use from a specified item or range of items. "Host" or "Target", plus an optional index number base 0, if you want to select from multiple host or target languages. These can also be abbreviated as "h" or "t", plus the optional index number. Some examples: "Target", "target0", "h". Note that letter case is ignored here. Alternatively a standard language code can be use here to specify a language directly, for example, "en" for English. (See http://msdn.microsoft.com/en-us/library/ms866170.aspx for a list of these codes.)
mediaLanguage This is for specifying the media language to use. (Same value format as for "language".)
itemIndex, studyItemIndex This is for an index value or variable instance, indexing a content component's item. I.e. 0 for the first item, or {variableName} for a variable value, presumably from an enclosing element.
itemCount This is for specifying the number of items to display, starting at a given item index, or from the beginning if no itemIndex was specified. I.e. 2 for two items, or {variableName} for a variable value, presumably from an enclosing element.
sentenceIndex This is for a sentence index value or variable instance, indexing a content component's item's sentence. I.e. 0 for the first sentence, or {variableName} for a variable value, presumably from an enclosing element.
tag This is for a symbolic value that is used to identify a range of text or study list lesson component items for which the starting item has a "Tag" attribute attached to it. An item with a different or empty tag marks the end of the items display, but is itself not displayed, unless another "insert" element references it. (A tag value set in an attribute in the text content.)
name This is for specifying a string as the substitution value instead of a content component. The string in the UI language.
options This is for specifying a list of comma-separated options for displaying the item or items. See the description of the options supported for the reference specifications here. I.e. ElementType="div", NoAnnotations="true"
LanguageFormat Specifies whether language items are mixed together or separated. Mixed (default), Separate
Mixed Specifies that language items are mixed together, target languages first, then host. True, False, Yes, No, On, Off (default true)
Separate Specifies that language items are displayed separately, grouped according to language. True, False, Yes, No, On, Off (default false)
RowFormat Specifies whether text items are displayed as paragraphs or separate sentences. Paragraphs (default), Sentences
Paragraphs Specifies that text items are displayed as paragraphs. True, False, Yes, No, On, Off (default true)
Sentences Specifies that text items are displayed as separate sentences. True, False, Yes, No, On, Off (default false)
DisplayFormat Specifies whether vocabulary content is displayed in table or list formmat. Table (default), List
Table Specifies that vocabulary content is displayed in table format. True, False, Yes, No, On, Off (default true)
List Specifies that vocabulary content is displayed in table format. True, False, Yes, No, On, Off (default false)
ShowAnnotations Specifies whether annotations are displayed, if present. True, False, Yes, No, On, Off (default true)
HideAnnotations, NoAnnotations Specifies that annotations are not to be displayed. True, False, Yes, No, On, Off (default false)
UseAudio Specifies whether play controls for audio media is displayed, if audio is attatched to items. True, False, Yes, No, On, Off (default true)
NoAudio Specifies that no play controls will be displayed. True, False, Yes, No, On, Off (default false)
UsePicture Specifies whether pictures associated with items are displayed. True, False, Yes, No, On, Off (default true)
NoPicture Specifies that no pictures will be displayed. True, False, Yes, No, On, Off (default false)
UseMedia Specifies whether play controls for audio media and attached pictures are displayed, if these are attatched to items. True, False, Yes, No, On, Off (default true)
NoMedia Specifies that no play controls or pictures will be displayed. True, False, Yes, No, On, Off (default false)
style Specifies an HTML style attribute value to be attached to the HTML element wrapping the overall item or group. (HTML "style" attribute value, i.e. color: red)
class Specifies a CSS class name to be attached to the HTML element wrapping the overall item or group. (a class name attribute value from an CSS file include by this web site, or embedded in the markup.)
elementtype This attribute gives a hint to the renderer as to how to render the referenced component or component item. For example, referencing a whole component and specifying "table", an HTML table element will be generated for the component. The format of the table depends on the lesson component type that is referenced, such that it will be similiar to the default layout displayed for those components. Other alternatives are "tr", "td", or some other HTML tag name. span (default), div, td, tr, table
player Specifies the player view type for a media item. "Full" displays a normal media item player. "Small" displays a smaller player with mainly only player controls (additional options via the showvolume, showtimeslider, and showtimetext attributes). "Tiny" displays an even smaller player with just a play, pause, and stop button. "None" doesn't display a player but just plays the media. "InLine" doesn't display a player view, but used the existing inline player (same a view="false").
autoplay Specifies that for a media item, the media will start playing automatically. True, False, Yes, No, On, Off (default false)
playerid This attribute gives the media player a unique ID, for the case where you have multiple media players to be controlled separately. ID string or number
showvolume This attribute is only used for "small" media players. It enables or disabled the display of the volume control in the player. True, False, Yes, No, On, Off (default false)
showtimeslider This attribute is only used for "small" media players. It enables or disabled the display of the time slider control in the player. True, False, Yes, No, On, Off (default true)
showtimetext This attribute is only used for "small" media players. It enables or disabled the display of the time text display in the player. True, False, Yes, No, On, Off (default true)
endofmedia This attribute specifies what to do when the end of the media item is reached while playing. "Next" to continue script. "Stop" to stop and wait. "Next Lesson" to go to the next lesson. "Next Media" to go to the next media item.

Some examples:

<insert content="Words" showAnnotations="true" />

This will display the user's selected target language version of the first word in the vocabulary list with the content key or content type "Words".

<insert content="Words" itemIndex="0" language="Target" />

This will display the user's selected target language version of the first word in the vocabulary list with the content key or content type "Words".

<insert content="Words" tag="Extra" elementtype="table" />

This will display a table with the items from a vocabulary component with the key value or label value of "Words", starting with an item with a "Tag" attribute of "Extra" up to the end of the items, or a different or empty tag value. The items for the user's current languages (i.e. Target and Host, and any alternates) will be displayed, assuming they are in the lesson content component.


If

The "if" element is for a conditional rendering control mechanism, where you render this element's enclosed content only if a condition described in the attributes is met. Basically, the attributes will provide the three components needed for the condition test, a left operand, a condition, and a right operand. If the left and right operands evaluate to integer numbers, an intregal comparison will be performed. Otherwise a string comparison will be performed. The syntax:

<if attributeName="attributeValue" ...>
Markup content, which is displayed only if the condition is met.
</if>

The attributes:

Attribute Name Description
content This is for specifying a lesson content component for the condition test left operand, where the value is the content key, object type, name, or label.
subtype This is for accessing some other attribute of the referenced content, such as the title, description, content index, number of items, etc. (See the table here for a list of subtype names.)
subsubtype This is for accessing a sub-attribute attribute of an attribute of the referenced content. (See the table here for a list of subtype names and a description of the subsubtypes that go with them.)
language The "language" term indicates a single language to use, represented by one of the place-holders "Host" or "Target", plus an optional index number base 0, if you want to select from multiple host or target languages. These can also be abbreviated as "h" or "t", plus the optional index number. Some examples: "Target", "target0", "h". Note that letter case is ignored here. Alternatively a standard language code can be use here to specify a language directly, for example, "en" for English. (See http://msdn.microsoft.com/en-us/library/ms866170.aspx for a list of these codes.)
itemIndex, studyItemIndex This is for an index value or variable instance, indexing a content component's item. I.e. 0 for the first item, or {variableName} for a variable value, presumably from an enclosing element.
tag This is for a symbolic value that is used to identify a range of text or study list lesson component items for which the starting item has a "Tag" attribute attached to it. An item with a different or empty tag marks the end of the items display, but is itself not displayed, unless another "insert" element references it.
name This is for specifying a string as the substitution value instead of a content component.
have The condition is met if the component, component item, or variable value exists and is not empty.
havelanguage The condition is met if the current user has set up a given languages represented by a place-holder. The attribute value is one of (Host, Target, Host[0..3], Target[0..3])
havemedia The condition is met if the component or component item has media of a given type. The attribute value is one of (Media, Audio, Video, Picture)
hascontent The condition is met if the content specified exists. The attribute value is a content specifier.
equals, equal The condition test is to check for equality. The attribute value is the other operand of the comparison, or if the "operand" attribute is used, it should be empty.
notequals, notequal The condition test is to check for inequality. The attribute value is the other operand of the comparison, or if the "operand" attribute is used, it should be empty.
greater, greaterthan The condition test is to check for greater than. The attribute value is the other operand of the comparison, or if the "operand" attribute is used, it should be empty.
less, lessthan The condition test is to check for less than. The attribute value is the other operand of the comparison, or if the "operand" attribute is used, it should be empty.
greaterorequal, greaterthanorequal The condition test is to check for greater or equal than. The attribute value is the other operand of the comparison, or if the "operand" attribute is used, it should be empty.
lessorequal, lessthanorequal The condition test is to check for less than or equal. The attribute value is the other operand of the comparison, or if the "operand" attribute is used, it should be empty.
condition The condition attribute is another way of directly specifying the condition test.
operand The operand attribute specifies the other operand in the condition test.

Some examples:

<if content="Words" subtype="Count" notequal="0" >
Elements or text content to be rendered if the condition is met.
</if>

The above will only display the content if the vocabulary list if the "Words" content has any entries.

<if havelanguage="Target1" >
Elements or text content to be rendered if the condition is met.
</if>

This above will only display the content if the current user has a second target language set.


Foreach

The "foreach" element is for iterating over a range of values specified by the attributes. You specify a name attribute which will be used as a variable for substitutions in the element content via the "{}" markup. By specifying a lesson component or list of values in the attributes, the element content will be repeated for each iterated value, substituting the "{}" instances reference the given name with the iterated value. The syntax:

<foreach attributeName="attributeValue" ...>
Markup content, to be duplicated for each iteration, with substitutions performed.
</foreach>

The attributes:

Attribute Name Description
content This is for specifying a lesson content component for the iteration, where the value is the content key, object type, name, or label. If you specify "Lesson", it will iterate over all the lesson components, or if subtype is set to a content type name, it will just iterate over those content types.
subtype The subtype. The value depends on the content type. The allowed subtype names: Text, SpeakerName, Index, or in the case where the component is "Lesson", the subtype could be a content type name.
language This is for a language place-holder name, such as Host, Target, Host[0..3], Target[0..3]. It's used to select a specific translation based the user's selected languages.
tag This is for a symbolic value that is used to identify a range of text or study list lesson component items for which the starting item has a "Tag" attribute attached to it. An item with a different or empty tag marks the end of the items' range.
name This is for specifying a variable name to be used in "{}" substitutions in the element content.
seps The seps attribute is for specifying one or more separator characters that may appear in the values attribute, to be used in parsing the values attribute. The seps attribute must appear before the values attribute.
values The values attribute can be used to explicitly specify a list of values to iterate over. If the values attribute is used, you don't specify a content.

An example:

<foreach content="Words" subtype="Text" name="value" >
<div>{value}</div>
</foreach>

This will display a vocabulary list with the "Words" content component, using the language placeholder specified in the document component or markup template's "TargetDisplayLanguage" option. Each item will be enclosed in <div>'s.


For

The "for" element is for iterating over a range of numeric values specified by the attributes. You specify a name attribute which will be used as a variable for substitutions in the element content via the "{}" markup. You can specify a first value, step value, and last value The syntax:

<for attributeName="attributeValue" ...>
Markup content, to be duplicated for each iteration, with substitutions performed.
</for>

The attributes:

Attribute Name Description
name This is for specifying a variable name to be used in "{}" substitutions in the element content.
first Specifies a first value. This can also be a substitution.
step Specifies a step value, which is the amount to increase or decrease the iteration value after each iteration.
last Specifies a last value (inclusive). This can also be a substitution.
limit Specifies a limit value (exclusive). This can also be a substitution.

An example:

<table>
<for name="value" first="0" step="2" limit="$(Words.Count)" >
<tr>
<td>$(Words[{value}].Target)</td>
<td>$(Words[{value}].Host)</td>
</tr>
</for>
</table>

This will display a table of a vocabulary list with the "Words" label, using the user's selected target and host language, skipping even-indexed items.


Generate

The "generate" element is for generating audio lesson media. When used with a lesson media component, its content specifies what is placed in an audio media file, and if you specified a transcript component in the audio media component, a matching transcript will be generated as well. When used in a lesson textual component, its content mirrors the written form of what might be placed in the audio media file, except that items whose order depends on spaced repetition times might be ordered differently, as getting the amount of time needed for each element is impractical to predict.

The generate element currently has no attribtutes. It can be the top level element in place of "Markup".

The syntax:

<generate>
(Elements describing generated content.)
</generate>

An example:

<generate>
{This is the first thing spoken.}
{Items in braces like these are strings that may be translated.}
{These can also be pre-recorded via the string mechanism.}
<say field="lesson.title" />
<each>
<item />
</each>
</generate>

This will display the three brace-enclosed strings in the current host language, then the lesson title, and then it will iterate over the text items associated with the media item.


Say

The "say" element is used for generating audio lesson media for speaking or displaying the name of a specified content field.

The syntax:

<say field="(field reference)" />

The attributes:

Attribute Name Description
field A field designation, which has the syntax: (fieldName) or (object).(fieldName) The "(object)" can be one of "lesson", "group", "course", "studylist", "plan", or a lesson content key or type. If omitted, the current content, node, first target component, or media item is used, whichever is first present in this order. The "(field)" can be one of "title", "description", "label", "owner", "index", "ispublic", "package", "creationtime", "modifiedtime", or a language designator such as "target", "t", "target0"|"t0" through "target3"|"t3", "host", "h", "host0" through "host3" | "h3", or "ui", the latter of which will say or write the language name.

An example:

<generate>
{This is the first thing spoken.}
{Items in braces like these are strings that may be translated.}
<say field="lesson.title" />
</generate>

This will speak the two brace-enclosed string in the current language, and then will say the lesson title.


Pause

The "pause" element is used only for generating audio lesson media for appending a period of silence in the audio output file.

The syntax:

<pause seconds="(pause time)" multiply="(multiply time)" add="(add time)" />

The attributes:

Attribute Name Description
seconds Designates the pause time, in seconds, as a floating point number. If not specified the default seconds is the duration of the last spoken text item.
multiply Multiplies the seconds duration by the given factor, as a floating point number. This is a way to adjust the pause time when seconds is omitted and the time is the duration of the last spoken text item.
add Adds to the seconds duration the given amount, as a floating point number. This is another way to adjust the pause time when seconds is omitted and the time is the duration of the last spoken text item.
minimum Minimum pause value. This is a way to ensure that the pause is at least a certain amount of time, as in the "add" or "multiply" cases, the length of the last spoken item is used as part of the pause time calculation.

An example:

<generate>
{Pause for one second}
<pause seconds="1" />
{Pause for 5.5 seconds}
<pause seconds="5.5" />
<item index="0" />
{Pause for 1.5 times the duration of the item}
<pause multiply="1.5" />
</generate>

This will pause for the indicated times.


Item

The "item" element is used for generating audio lesson media from one or more language items from the current working set of items. If none of the "index", "start", "end", "label", "tag", or "all" attributes are used to explicitly specify items, the current study item from an enclosing "each" or "duration" element is used.

The syntax:

<item index="(item index)" start="(start index)" end="(end index)" label="(label annotation)" tag="(tag annotation)" all="" language="(language designator)" speed="(speed designator)" />

The attributes:

Attribute Name Description
index Specifies that one item should be rendered, selecting the item with the given index.
start Specifies the starting index of one or more items that should be rendered.
end Specifies that ending index of one or more items that should be rendered.
label Specifies that items with the given label annotation should be rendered, starting with the first item that has the label annotation, until a different label is encountered.
tag Specifies that items with the given tag annotation should be rendered, starting with the first item that has the tag annotation, until a different tag is encountered.
all Specifies that all items from the current textual lesson component of the current language should be rendered. The attribute value is ignored.
language Specifies the language of items that should be rendered. The attribute value is one of "Target", "t", "Target[0..3]", "t[0..3]", "Host", "h", "Host[0..3]", "h[0..3]", "UI", or is a language code, i.e. "en" or "zh-CHS".
speed Specifies the speed of the spoken items. It can be one of "slow", "normal", or "fast", or it can be a number from -10 to 10, where -10 is equivalent to "slow", and 10 is equivalent to "fast".

An example:

<generate>
{First five items:}
<item start="0" end="5" />
{All items:}
<item all="" />
{Items in tag "Verbs" range:}
<item all="" />
{Iterator over the target content items:}
<each>
{This is a normal item:}
<item />
{This is a slow item:}
<item speed="slow"/>
</each>
</generate>

This will render the indicated item ranges.


Each

The "each" element is used for generating audio lesson media from all or a specified range of language items from the current working set of items. It doesn't render the items itself, leaving that to enclosed "item" elements, but iterates over the study items selected by the current selector, setting a current item for the enclosed "item" elements for each iteration. The order in which items are displayed is based on the specified "selector" attribute, or in a simple forward sequential order if a selector is not specified. Once all the specified items are displayed, or a specified item count is reached, the element is exited.

The syntax:

<each content="(optional content key or type)" label="(label annotation)" tag="(tag annotation)" language="(language designator)" selector="(selector)" randomunique="(boolean)" randomnew="(boolean)" adaptivemixnew="(boolean)" chunksize="(chunk size)" level="(level)" mode="(mode designator)" count="(count)" />

The attributes:

Attribute Name Description
content Specifies that instead of getting items from the current working set or source, get the items from the specified lesson content component of the source lesson.
label Specifies that items with the given label annotation should be rendered, starting with the first item that has the label annotation, until a different label is encountered.
tag Specifies that items with the given tag annotation should be rendered, starting with the first item that has the tag annotation, until a different tag is encountered.
language Specifies the language of items that should be rendered. The attribute value is one of "Target", "t", "Target[0..3]", "t[0..3]", "Host", "h", "Host[0..3]", "h[0..3]", "UI", or is a language code, i.e. "en" or "zh-CHS".
selector Specifies a selector type, which corresponds to one of the selector codes used to select an algorithm for choosing what order to display the items in. It can be a selector value from the study list configuration, but only some of these make sense to use, since there is no way to provide feedback as to how well you know an item:
Selector Description
Forward Go through items forward sequentially as they appear in the study list, starting with the item with the lowest touch count.
Reverse Go through items in reverese order sequentially as they appear in the study list, starting with the item with the lowest touch count.
Random Go through items randomly. Use the "randomunique" attribute to indicate that items should appear only once in a round trip. Otherwise items can appear more than one time in a round trip, since the selection is random.
Adaptive Use the adaptive algorithm, where previously touched items are scheduled based on how well the item was known. New items are chosen in sequential order as they appear in the study list, unless the "randomnew" attribute also appears, which will cause new items to be chosen randomly from among items not seen yet.
Chunky Use a "chunky" algorithm, where for a group of the "chunk" size items, you have to indicate that you know them all before you can proceed to the next chunk. New items are ordered sequentially as they appear in the study list, unless the "randomnew" attribute also appears, which will cause new items to be chosen randomly from among items not seen yet.
Leitner Use a "Leitner" algorithm, where items are advanced from one level to the next if you indicate you know the item, or bumped to the lowest level if you don't. The "next" item is chosed from the lowest level with items. New items are ordered sequentially as they appear in the study list, unless the "randomnew" attribute also appears, which will cause new items to be chosen randomly from among items not seen yet.
Spaced Repetition Items are scheduled according to a time table, indexed according to how many times the item has been seen, with no regard to how well you actually know the item. New items are ordered sequentially as they appear in the study list, unless the "randomnew" attribute also appears, which will cause new items to be chosen randomly from among items not seen yet.
Note that the selector value is case-insensitive and you can omit the spaces if desired.
randomunique Used with the "Random" selector. If true, only use items once per round trip. If false, items can be used multiple times in a round trip.
randomnew Used with the "Adaptive" and "Spaced Repetition" selectors. If true, select new items randomly from amoung the items not seen yet. If false, select new items sequentially as they appear in the study list.
adpativemixnew Used with the "Adaptive" and "Spaced Repetition" selectors. If true, randomly mix new and review items. This is a way to force new items to appear, lest too many review items due for review prevent new items from appearing.
chunksize Used with the "Chunky" selector. Specifies how many items in a chunk, which is a subgroup of items chosen.
level Used with the "Adaptive" and "Spaced Repetition" selectors. This is a number from 0 to 10 which determine how aggresively the review items are scheduled. 0 (conservative) means that review items are scheduled sooner with shorter intervals. 10 (liberal) means that review items are scheduled later with longer intervals.
configuration The "configuration" is a name you can optionally provide that will cause the study item status to be associated under that name, to distinguish from other parts of the markup template script that may reference study item status as well. For example, if you have two "duration" or "each" loops, one that goes from the host to the target language, and another that goes from the target to the host language, specifying different configuration names will separate the two in terms of the next review time stored, so they don't affect each other.
mode Specifies an additional optional mode for the selector algorithm. This can be one of:
Mode Description
Normal Use the algorthm's normal mode. This is the default.
NewOnly Only select items which haven't been used or seen yet.
Review Only select items which have been used or seen.
Test Visit all items either sequentially, or if a random selector or option is used, randomly. Stop once all items have been used or seen.
ReviewTest Visit only items previously used or seen, either sequentially, or if a random selector or option is used, randomly. Stop once all review items have been used or seen.
count Used to limit the number of items rendered. Iteration stops which the given count is reached. The default is the number of items in the selected study list or the current working set.

An example:

<generate>
{Iterator over the current working set of study items from the target content:}
<each>
{This is a normal item:}
<item />
{This is a slow item:}
<item speed="slow"/>
</each>
</generate>

This will render both the normal speed and slow speed items for the current working set, which is the study items from the target content specified in the media item.


Duration

The "duration" element is used for generating audio lesson media from all or a specified range of language items from the current working set of items, up to a given time duration. It doesn't render the items itself, leaving that to enclosed "item" elements, but iterates over the study items selected by the current selector, setting a current item for the enclosed "item" elements for each iteration. The order in which items are displayed is based on the specified "selector" attribute, or in a simple forward sequential order if a selector is not specified.

The syntax:

<duration hours="(hours)" minutes="(minutes)" seconds="(seconds)" stopatend="(true|false)" content="(optional content key or type)" label="(label annotation)" tag="(tag annotation)" language="(language designator)" selector="(selector)" randomunique="(boolean)" randomnew="(boolean)" adaptivemixnew="(boolean)" chunksize="(chunk size)" level="(level)" mode="(mode designator)" count="(count)" />

The attributes:

Attribute Name Description
hours Specifies the hours component of the duration in integer format. The default is 0.
minutes Specifies the minutes component of the duration in integer format. The default is 0.
seconds Specifies the seconds component of the duration in integer format. The default is 0.
content Specifies that instead of getting items from the current working set or source, get the items from the specified lesson component of the source lesson.
label Specifies that items with the given label annotation should be rendered, starting with the first item that has the label annotation, until a different label is encountered.
tag Specifies that items with the given tag annotation should be rendered, starting with the first item that has the tag annotation, until a different tag is encountered.
language Specifies the language of items that should be rendered. The attribute value is one of "Target", "t", "Target[0..3]", "t[0..3]", "Host", "h", "Host[0..3]", "h[0..3]", "UI", or is a language code, i.e. "en" or "zh-CHS".
stopatend If "true", the loop will exit based on the selector mode when all items have been studied, or no items are due for review, or the duration as been reached. If "false", the loop will only exit when the duration time has been reached. The default is "false".
selector Specifies a selector type, which corresponds to one of the selector codes used to select an algorithm for choosing what order to display the items in. It can be a selector value from the study list configuration, but only some of these make sense to use, since there is no way to provide feedback as to how well you know an item:
Selector Description
Forward Go through items forward sequentially as they appear in the study list, starting with the item with the lowest touch count.
Reverse Go through items in reverese order sequentially as they appear in the study list, starting with the item with the lowest touch count.
Random Go through items randomly. Use the "randomunique" attribute to indicate that items should appear only once in a round trip. Otherwise items can appear more than one time in a round trip, since the selection is random.
Adaptive Use the adaptive algorithm, where previously touched items are scheduled based on how well the item was known. New items are chosen in sequential order as they appear in the study list, unless the "randomnew" attribute also appears, which will cause new items to be chosen randomly from among items not seen yet.
Chunky Use a "chunky" algorithm, where for a group of the "chunk" size items, you have to indicate that you know them all before you can proceed to the next chunk. New items are ordered sequentially as they appear in the study list, unless the "randomnew" attribute also appears, which will cause new items to be chosen randomly from among items not seen yet.
Leitner Use a "Leitner" algorithm, where items are advanced from one level to the next if you indicate you know the item, or bumped to the lowest level if you don't. The "next" item is chosed from the lowest level with items. New items are ordered sequentially as they appear in the study list, unless the "randomnew" attribute also appears, which will cause new items to be chosen randomly from among items not seen yet.
Spaced Repetition Items are scheduled according to a time table, indexed according to how many times the item has been seen, with no regard to how well you actually know the item. New items are ordered sequentially as they appear in the study list, unless the "randomnew" attribute also appears, which will cause new items to be chosen randomly from among items not seen yet.
Note that the selector value is case-insensitive and you can omit the spaces if desired.
randomunique Used with the "Random" selector. If true, only use items once per round trip. If false, items can be used multiple times in a round trip.
randomnew Used with the "Adaptive" and "Spaced Repetition" selectors. If true, select new items randomly from amoung the items not seen yet. If false, select new items sequentially as they appear in the study list.
adpativemixnew Used with the "Adaptive" and "Spaced Repetition" selectors. If true, randomly mix new and review items. This is a way to force new items to appear, lest too many review items due for review prevent new items from appearing.
chunksize Used with the "Chunky" selector. Specifies how many items in a chunk, which is a subgroup of items chosen.
level Used with the "Adaptive" and "Spaced Repetition" selectors. This is a number from 0 to 10 which determine how aggresively the review items are scheduled. 0 (conservative) means that review items are scheduled sooner with shorter intervals. 10 (liberal) means that review items are scheduled later with longer intervals.
configuration The "configuration" is a name you can optionally provide that will cause the study item status to be associated under that name, to distinguish from other parts of the markup template script that may reference study item status as well. For example, if you have two "duration" or "each" loops, one that goes from the host to the target language, and another that goes from the target to the host language, specifying different configuration names will separate the two in terms of the next review time stored, so they don't affect each other.
mode Specifies an additional optional mode for the selector algorithm. This can be one of:
Mode Description
Normal Use the algorthm's normal mode. This is the default.
NewOnly Only select items which haven't been used or seen yet.
Review Only select items which have been used or seen.
Test Visit all items either sequentially, or if a random selector or option is used, randomly. Stop once all items have been used or seen.
ReviewTest Visit only items previously used or seen, either sequentially, or if a random selector or option is used, randomly. Stop once all review items have been used or seen.

An example:

<generate>
{These are the duration items for 10 minutes.}
{Please translate the following:}
<duration minutes="10" selector="spaced repetition random">
<item language="host"/>
<pause multiply="1.5"/>
<item language="target"/>
<pause seconds="2"/>
</duration>
</generate>

This will review the translation of items from the working set from the host to target language for 10 minutes in spaced repetition random order. It will wait 1.5 times the time it took to speak the item in the host language for the user to respond. It will then give the item in the target language and pause for 2 seconds before going to the next item. The working set is the list of study items from the target content specified in the media item.


Play

The "play" element is used in either text markup, audio generation, or the automated scripting mechanism. For the text markup or automated mechanism, it will insert a media player for a specified media or study item. For the audio generation it will insert the audio file from the specified media or study item.

The syntax:

<play attributeName="attributeValue" ... />

The attributes:

Attribute Name Description Value
content This is for specifying a content component for the substitution, where the value is the content key, content type, object type, name, or label. I.e. Text, Transcript, Words, Sentences, Notes, etc., or "This" for the current content.
subtype This is for accessing some other attribute of the referenced content, such as the title, description, content index, number of items, etc. (See the table here for a list of subtype names.)
subsubtype This is for accessing a sub-attribute attribute of an attribute of the referenced content. (See the table here for a list of subtype names and a description of the subsubtypes that go with them.)
language Specifies the language of items that should be rendered. The attribute value is one of "Target", "t", "Target[0..3]", "t[0..3]", "Host", "h", "Host[0..3]", "h[0..3]", "UI", or is a language code, i.e. "en" or "zh-CHS".
medialanguage Specifies the media language of items that should be rendered. The attribute value is one of "Target", "t", "Target[0..3]", "t[0..3]", "Host", "h", "Host[0..3]", "h[0..3]", "UI", or is a language code, i.e. "en" or "zh".
itemIndex, studyItemIndex This is for an index value or variable instance, indexing a content component's item. I.e. 0 for the first item, or {variableName} for a variable value, presumably from an enclosing element.
itemCount This is for specifying the number of items to display, starting at a given item index, or from the beginning if no itemIndex was specified. I.e. 2 for two items, or {variableName} for a variable value, presumably from an enclosing element.
sentenceIndex This is for a sentence index value or variable instance, indexing a content component's item's sentence. I.e. 0 for the first sentence, or {variableName} for a variable value, presumably from an enclosing element.
tag This is for a symbolic value that is used to identify a range of text or study list lesson component items for which the starting item has a "Tag" attribute attached to it. An item with a different or empty tag marks the end of the items display, but is itself not displayed, unless another "insert" element references it. (A tag value set in an attribute in the text content.)
name This is for specifying a string as the substitution value instead of a content component. The string in the UI language.
view This attribute pertains to the automated mechanism, and is for selecting the inline player (false) or a media player view (true). True, False, Yes, No, On, Off (default false)
player This attribute specifies what type of media player view to use. "Full" displays a normal media item player. "Small" displays a smaller player with mainly only player controls (additional options via the showvolume, showtimeslider, and showtimetext attributes). "Tiny" displays an even smaller player with just a play, pause, and stop button. "None" doesn't display a player but just plays the media. "InLine" doesn't display a player view, but used the existing inline player (same a view="false").
elementtype This attribute gives a hint to the renderer as to how to render the referenced component or component item. For example, referencing a whole component and specifying "table", an HTML table element will be generated for the component. The format of the table depends on the lesson component type that is referenced, such that it will be similiar to the default layout displayed for those components. Other alternatives are "tr", "td", or some other HTML tag name. span (default), div, td, tr, table
class Allows you to specify a CSS class for the generated element. A CCS style name from this sites's css files, or for a style you embed. (Use the browser debugger to examine the css files loaded in this site.)
style Allows you to specify some raw styles for the generated element. These must be valid HTML styles for the target element. (An HTML "style" attribute value, i.e. color: red)
autoplay This attribute enables or disabled the automatic starting of playing the media file. True, False, Yes, No, On, Off (default true)
playerid This attribute gives the media player a unique ID, for the case where you have multiple media players to be controlled separately. ID string or number
showvolume This attribute is only used for "small" players. It enables or disabled the display of the volume control in the player. True, False, Yes, No, On, Off (default false)
showtimeslider This attribute is only used for "small" players. It enables or disabled the display of the time slider control in the player. True, False, Yes, No, On, Off (default true)
showtimetext This attribute is only used for "small" players. It enables or disabled the display of the time text display in the player. True, False, Yes, No, On, Off (default true)
endofmedia This attribute specifies what to do when the end of the media is reached while playing. "Next" to continue script, "Stop" to stop and wait.
speed This attribute specifies the media playback speed. It can be one of "slow", "normal", or "fast", or it can be a number from -10 to 10, where -10 is equivalent to "slow", and 10 is equivalent to "fast".

An example:

<generate>
{Here's the audio dialog:}
<play content="AudioDialog" player="full" />
</generate>

This will insert a full media player.


Study

The "study" element is used in either text markup or automated scripting. It will insert a study tool view for a specified study list content.

The syntax:

<study attributeName="attributeValue" ... />

The attributes:

Attribute Name Description Value
content This is for specifying a content component for the substitution, where the value is the content key, content type, object type, name, or label. I.e. Words, Sentences, Characters, etc., or "This" for the current content.
name This is for specifying a string as the substitution value instead of a content component. The string in the UI language.
options This is for specifying a list of comma-separated options for displaying the item or items. See the description of the options supported for the reference specifications here. I.e. ElementType="div", NoAnnotations="true"
useaudio This attribute specifies whether audio is enabled, if the configuration specifies audio. True, False, Yes, No, On, Off (default true)
usepicture This attribute specifies whether pictures are enabled, if the configuration specifies pictures. True, False, Yes, No, On, Off (default true)
usemedia This attribute specifies whether audio or pictures are enabled, if the configuration specifies audio or pictures. True, False, Yes, No, On, Off (default true)
endofstudy This attribute specifies what to do when the end of the media is reached while playing. "Next" to continue script, "Stop" to stop and wait.
session or sessionindex This attribute specifies a session number. A session number. The default is the last used.
tool or tooltype This attribute specifies what type of study tool view is displayed. "Flash", "Match", "Test", or "HandsFree". The default is the last used.
profile This attribute specifies the profile name. The profile name. The default is the last used.
configuration This attribute specifies the tool configuration key or label or title prefix. It can be a configuration key, label, or title prefix. The default is the last used.
mode This attribute specifies the flash tool mode. It can be one of "Normal", "New Only", "Review", "Test", or "Review Test". The default is the last used.

An example:

<generate>
{Now study hearing and reading the vocabulary in}
$(Host) {and translating to} $(Target)
<study content="Words" tool="Flash" profile="Default" configuration="Trans1" />
</generate>

This will insert a flash study tool for the "Words" content using the "Default" profile and the "Trans1" configuration key.


StudyItem

The "studyitem" element is used in automated scripting only. It will insert a flash study tool card sides view for a specified study item. If the "index" attribute is not used, the current study item from an enclosing "each" or "duration" element is used.

The syntax:

<study attributeName="attributeValue" ... />

The attributes:

Attribute Name Description Value
index This is for explicitly specifying a study item using it's index in the study list. If this attribute is not present, an enslosing "each" or "duration" construct will provide the study item to be used. A study item index (0 on up to the study item count - 1).

An example:

<generate>
<each content="Words" configuration="Forward">
<studyitem configuration="Trans1" />
</each>
</generate>

This will loop on all words displaying a flash subview using the "Trans1" configuration.


Choose

The "choose" element is used in either text markup or automated scripting. It will insert a choose view consisting of buttons rendered from child "choice" elements. When a choice button is clicked, the view will be changed to render the contents of the selected choice element.

The syntax:

<choose attributeName="attributeValue">(choice elements)</choose>

The attributes:

Attribute Name Description Value
id This specifies an element ID attribute to be included in the output div element. An element ID.
language This is for specifying the language or language place-holder name, for selecting which language to use for the prompt and choice item labels. "Host" or "Target", plus an optional index number base 0, if you want to select from multiple host or target languages. These can also be abbreviated as "h" or "t", plus the optional index number. Some examples: "Target", "target0", "h". Note that letter case is ignored here. Alternatively a standard language code can be use here to specify a language directly, for example, "en" for English. (See http://msdn.microsoft.com/en-us/library/ms866170.aspx for a list of these codes.)
prompt This specifies a prompt to be displayed and/or spoken before the choices. A prompt string.
orientation This specifies the orientatin of the enclosed choices. "Vertical" displays the choices vertically. "Horizontal" displays the choices horizontally. "Float" displays the choices horizontally and will wrap.
width This specifies the width of the choose view. I.e.: 600px
choicewidth This specifies the default witdt for all choice items. I.e.: 150px
class This specifies a class attribute to be used in the generated div element. A CSS class name.
choiceclass This specifies a class attribute to be used in the generated choice div elements. A CSS class name.
style This specifies a style attribute to be used in the generated div element. CSS styles separated by semicolons.
choicestyle This specifies a style attribute to be used in the generated choice div elements. CSS styles separated by semicolons.

An example:

<generate>
<loop>
<choose orientation="float" prompt="What would you like to do next?:">
<choice prompt="Play Audio Dialog">
{Here's the audio dialog:}
<play content="AudioDialog" player="full" />
</choice>
<choice prompt="View Vocabulary Words">
<h2>{Vocabulary Words}</h2>
<insert content="Words" />
</choice>
<choice prompt="View Dialog Text">
<h2>{Dialog Text}</h2>
<insert content="Text" />
</choice>
<choice prompt="View Lesson Notes">
<insert content="Notes" />
</choice>
<choice prompt="Study Vocabulary">
<study content="Words" profile="Default" />
</choice>
<choice prompt="Study Sentences">
<study content="Sentences" profile="Default" />
</choice>
<choice prompt="Next Lesson" command="nextlesson" />
<choice prompt="Previous Lesson" command="previouslesson" />
<choice prompt="Stop" command="stop" />
</choose>
</loop>
</generate>

This will display several different kinds of choices.


Choice

The "choice" element is used in either text markup or automated scripting inside a "choose" element. It will render a choice button control. If the choice button is clicked, the view will be changed to render the contents of the selected choice element.

The syntax:

<choice attributeName="attributeValue">(elements to render if chosen)</choice>

The attributes:

Attribute Name Description Value
id This specifies an element ID attribute to be included in the output div element. An element ID.
language This is for specifying the language or language place-holder name, for selecting which language to use for the prompt and choice item labels. "Host" or "Target", plus an optional index number base 0, if you want to select from multiple host or target languages. These can also be abbreviated as "h" or "t", plus the optional index number. Some examples: "Target", "target0", "h". Note that letter case is ignored here. Alternatively a standard language code can be use here to specify a language directly, for example, "en" for English. (See http://msdn.microsoft.com/en-us/library/ms866170.aspx for a list of these codes.)
prompt This specifies a prompt to be displayed on the rendered choice button. A button label.
width This specifies the width of the choice button. I.e.: 150px
class This specifies a class attribute to be used in the generated button container div element. A CSS class name.
style This specifies a style attribute to be used in the generated button container div element. CSS styles separated by semicolons.
name This specifies the name of an "view" element to activate if this choice is selected. The "name" attribute of an existing "view" element outside the "choose" element.
mode This specifies whether the choice child elements are to be rendered as an automated script or a text markup view. "Automate" causes the child elements to be rendered as a script. "Display" causes the child elements to be rendered as markup text.
command This specifies an automated command to be executed. One of "home", "play", "pause", "stop", "end", "backstep", "repeat", "forwardstep", "nextlesson", "previouslesson", "nextcontent", "previouscontent", or "goto".
target This specifies what subview receives a "command", as some commands would otherwise be ambiguous (i.e. does "play" refer to a media player or the automated player), or a command argument, such as for "goto". It can be "automated" or "media" (default "" is "automated"), or a "goto" command marker name target.
goto This specifies a marker name to jump to in an automated script. The "name" attribute for a "marker" element.

An example:

<generate>
<loop>
<choose orientation="float" prompt="What would you like to do next?:">
<choice prompt="Play Audio Dialog">
{Here's the audio dialog:}
<play content="AudioDialog" player="full" />
</choice>
<choice prompt="View Vocabulary Words">
<h2>{Vocabulary Words}</h2>
<insert content="Words" />
</choice>
<choice prompt="View Dialog Text">
<h2>{Dialog Text}</h2>
<insert content="Text" />
</choice>
<choice prompt="View Lesson Notes">
<insert content="Notes" />
</choice>
<choice prompt="Study Vocabulary">
<study content="Words" profile="Default" />
</choice>
<choice prompt="Study Sentences">
<study content="Sentences" profile="Default" />
</choice>
<choice prompt="Next Lesson" command="nextlesson" />
<choice prompt="Previous Lesson" command="previouslesson" />
<choice prompt="Stop" command="stop" />
</choose>
</loop>
</generate>

This will display several different kinds of choices.


View

The "view" element is used in either text markup or automated scripting. It wraps some child elements for display, but hides the rendered output by default. Instead, a chosen "choice" element that references the view by name will enable the display of the child elements. Also, "show" and "hide" elements can control the view's visibility.

The syntax:

<view attributeName="attributeValue">(elements to render if enabled)</view>

The attributes:

Attribute Name Description Value
name This specifies the name of the "view". A name string.
width This specifies the width of the view. I.e.: 150px
class This specifies a class attribute to be used in the generated view container div element. A CSS class name.
style This specifies a style attribute to be used in the generated view container div element. CSS styles separated by semicolons.
hidden This specifies whether the rendered div element containing the view is hidden for display or not. True, False, Yes, No, On, Off (default true)

An example:

<Markup>
<choose>
<choice prompt="View One" name="one">
</choice>
<choice prompt="View Two" name="two">
</choice>
</choose>
<view name="one">
{I chose one.}
</view>
<view name="two">
{I chose two.}
</view>
</Markup>

This will display a choose element referencing some views.


Show

The "show" element is used in either text markup or automated scripting. It manages the visibility of a referenced view.

The syntax:

<show name="viewName" />

The attributes:

Attribute Name Description Value
name This specifies the name of the "view" to show. A view name string.

An example:

<show name="viewName" />

This will display a a view with name "viewName".


Hide

The "hide" element is used in either text markup or automated scripting. It manages the visibility of a referenced view.

The syntax:

<hide name="viewName"/>

The attributes:

Attribute Name Description Value
name This specifies the name of the "view" to hide. A view name string.

An example:

<hide name="viewName" />

This will hide a a view with name "viewName".


Loop

The "loop" element is used in automated scripting only. It will repeat the enclosed subelements until the script exits via a "Stop" click or some chosen command that implies a script exit.

The syntax:

<loop> (child elements) </loop>

The attributes:

(none)


An example:

<generate>
<loop>
<choose orientation="float" prompt="What would you like to do next?:">
<choice prompt="Play Audio Dialog">
{Here's the audio dialog:}
<play content="AudioDialog" player="full" />
</choice>
<choice prompt="View Vocabulary Words">
<h2>{Vocabulary Words}</h2>
<insert content="Words" />
</choice>
<choice prompt="View Dialog Text">
<h2>{Dialog Text}</h2>
<insert content="Text" />
</choice>
<choice prompt="View Lesson Notes">
<insert content="Notes" />
</choice>
<choice prompt="Study Vocabulary">
<study content="Words" profile="Default" />
</choice>
<choice prompt="Study Sentences">
<study content="Sentences" profile="Default" />
</choice>
<choice prompt="Next Lesson" command="nextlesson" />
<choice prompt="Previous Lesson" command="previouslesson" />
<choice prompt="Stop" command="stop" />
</choose>
</loop>
</generate>

This will loop on all words displaying a flash subview using the "Trans1" configuration.


Marker

The "marker" element is used in automated scripting only. It labels a section of the script for used in jumping to a script section directly, either via the automated player view, or a "goto" choice in a "choose" element.

The syntax:

<marker name="marker name" />

The attributes:

name This specifies the marker name. A name string.

An example:

<generate>
<marker name="Beginning">
{This is the beginning.};
<marker name="End">
{This is the end.};
</generate>

If you set a starting marker, the script will start there.


Learning

Learning how to use the markup template mechanism can be intimidating. Perhaps the best way is to look at examples, such as those provided by JTLanguage, as well as those of other teachers, and just copy and modify them. Since JTLanguage is a free and cooperative site, teachers can look at other teacher's markup templates and copy from them, but please don't copy other teachers' actual content (i.e. text, vocabulary, notes, pictures, audio/visual media) unless you have explicit permission from them first.

Help menuHelp menu Back