Help - Text - Browse

JTLanguage help browser.

Generate/Automated Markup Reference

Introduction

In addition to formatting HTML pages, the markup format mechanism is also used as a scripting mechanism for generating audio lessons or files, and as the basis for the "Automated" study mechanism.

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 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>, 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.

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".
$(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].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", "Target", "TargetAlternate1", "TargetAlternate2", or "TargetAlternate3", which also can be abbreviated as "h", "t", "ta1", "ta2", or "ta3". (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, TargetAlternative1, ...
Description The content description. Host, Target, TargetAlternative1, ...
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
Target The name of the current target language. Language, LanguageOnly, LanguageCultureExtension, LanguageCode, CultureCode, ExtensionCode, LanguageCultureExtensionCode
TargetAlternate1..3 The name of the current target alternate 1..3 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 option names:

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.
$(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 text starts looking like a programming language. They use the standard XML form: <elementname attributename="attributevalue" ...>content</elementname>

The following summarizes the extension elements:

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.
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 subsections describe these elmeents in more detail.


Insert

The "insert" element is a more robust way of doing a substitution, where you want more control over what is substituted and how it is done. The syntax:

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

The attributes:

Attribute Name Description
component This is for specifying a lesson component for the substitution, where the value is the component key, object type, name, or label.
subcomponent The sub component. The value depends on the component type. Some common subcomponent names: Title, Description, Count, Owner, Index, IsPublic
language This is for a language place=holder name, such as Host, Target, TargetAlternate1, TargetAlternate2, or TargetAlternate3. It's used to select a specific translation based the user's selected languages.
index This is for an index value or variable instance, indexing a components item.
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 component.
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.
class Allows you to specify a CSS class for the generated element. This is not too useful since you presently don't have control over the style sheet of the rendered page. But you can reference something in JTLanguage's site.css file.
style Allows you to some raw styles for the generated element. These must be valid HTML styles for the target element.

An example:

<insert component="Words" index="0" language="Target" />

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

Another example:

<insert component="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 component.


If

The "if" element is for a conditional rendering control mechanism, where you render this element's 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, 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
component This is for specifying a lesson component for the condition test left operand, where the value is the component key, object type, name, or label.
subcomponent The sub component. The value depends on the component type. Some common subcomponent names: Title, Description, Count, Owner, Index, IsPublic
language This is for a language place=holder name, such as Host, Target, TargetAlternate1, TargetAlternate2, or TargetAlternate3. It's used to select a specific translation based the user's selected languages.
index This is for an index value or variable instance, indexing a components item.
tag This is for a symbolic value that is used to identify a text or study list lesson component item which has a "Tag" attribute attached to it with the given attribute value.
name This is for specifying a variable as a condition operand.
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 component or component item has content for a given languages. The attribute value is one of (Host, Target, TargetAlternate[1..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)
equals, equal The condition test is to check for equality. This attribute doesn't take a value.
notequals, notequal The condition test is to check for inequality. This attribute doesn't take a value.
greater, greaterthan The condition test is to check for greater than. This attribute doesn't take a value.
less, lessthan The condition test is to check for less than. This attribute doesn't take a value.
greaterorequal, greaterthanorequal The condition test is to check for greater or equal than. This attribute doesn't take a value.
lessorequal, lessthanorequal The condition test is to check for less than or equal. This attribute doesn't take a value.
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.

An example:

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

This will only display the content if the vocabulary list with the "Words" label has any entries.


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
component This is for specifying a lesson component for the iteration, where the value is the component key, object type, name, or label. If you specify "Lesson", it will iterate over all the lesson components, or if subcomponent is set to a component type name, it will just iterate over those component types.
subcomponent The sub component. The value depends on the component type. Some common subcomponent names: Text, SpeakerName, Title, Description, Count, Owner, Index, IsPublic, or in the case where the component is "Lesson", the subcomponent could be a component type name.
language This is for a language place=holder name, such as Host, Target, TargetAlternate1, TargetAlternate2, or TargetAlternate3. 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 used, you don't specify a component.

An example:

<foreach component="Words" subcomponent="Text" name="value" >
<div>{value}</div>
</foreach>

This will display a vocabulary list with the "Words" label, 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. 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.

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.}
<say field="lesson.title" />
</generate>

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


Say

The "say" element is used only for generating audio lesson media for speaking or writing the name of some 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 component key. The "(field)" can be one of "title", "description", "label", "owner", "index", "ispublic", "package", "creationtime", "modifiedtime", or a language designator such as "target", "t", "targetalternate1"|"ta1" through "targetalternate3"|"ta3", "host", "h", 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.
add Adds to the seconds duration the given amount, as a floating point number.

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 only for generating audio lesson media from one or more language items from the current working set of items.

The syntax:

<item index="(item index)" start="(start index)" end="(end index)" label="(label annotation)" tag="(tag annotation)" all="" language="(language 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", "TargetAlternate1", "ta1", "TargetAlternate2", "ta2", "TargetAlternate3", "ta3", "Host", "h", "UI", or is a language code, i.e. "en" or "zh-CHS".

An example:

<generate>
{First five items:}
<item start="0" end="5" />
{All items:}
<item all="" />
{Items in tag "Verbs" range:}
<item all="" />
</generate>

This will render the indicated item ranges.


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. 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, the element is exited.

The syntax:

<each componentkey="(optional component key)" label="(label annotation)" tag="(tag annotation)" language="(language designator)" selector="(selector)" review="(true|false)" test="(true|false)" newonly="(true|false)" />

The attributes:

Attribute Name Description
componentkey 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", "TargetAlternate1", "ta1", "TargetAlternate2", "ta2", "TargetAlternate3", "ta3", "Host", "h", "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 an 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, with no respect to whether the item has been touched before.
Random Unique Go through items randomly, but only touch items once per round trip.
Adaptive Sequential Use 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.
Adaptive Random Use adaptive algorithm, where previously touched items are scheduled based on how well the item was known. New items are chosen in random order.
Adaptive Mix Sequential Use a mix of the adaptive algorithm and forward sequential selection. For big study lists this will keep you from being stuck in reviewland. New items are chosen in sequential order as they appear in the study list.
Adaptive Mix Random Use a mix of the adaptive algorithm and forward sequential selection. For big study lists this will keep you from being stuck in reviewland. New items are chosen in random order.
Chunky Sequential 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 appeare in the study list.
Chunky Random 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 randomly.
Leitner Sequential 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 appeare in the study list.
Leitner Random 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 randomly.
Spaced Repetition Sequential Items are scheduled according to a Pimsleur-like time table, with no regard to how well you actually know the item. New items are ordered sequentially as they appeare in the study list.
Spaced Repetition Random Items are scheduled according to a Pimsleur-like time table, with no regard to how well you actually know the item. New items are ordered randomly.
Note that the selector value is case-insensitive and you can omit the spaces if desired.
review If true, indicates that only items touched before are selected.
test If true, it puts selector in a test mode, such that items are touched only once.
newonly If true, indicates that only items not touched before this session are selected.

An example:

<generate>
{These are the each items:}
<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 working set.


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 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 componentkey="(optional component key)" label="(label annotation)" tag="(tag annotation)" language="(language designator)" selector="(selector") review="(true|false)" test="(true|false)" newonly="(true|false)" hours="(hours)" minutes="(minutes)" seconds="(seconds)" stopatend="(true|false)" />

The attributes:

Attribute Name Description
componentkey 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", "TargetAlternate1", "ta1", "TargetAlternate2", "ta2", "TargetAlternate3", "ta3", "Host", "h", "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 an 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, with no respect to whether the item has been touched before.
Random Unique Go through items randomly, but only touch items once per round trip.
Adaptive Sequential Use 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.
Adaptive Random Use adaptive algorithm, where previously touched items are scheduled based on how well the item was known. New items are chosen in random order.
Adaptive Mix Sequential Use a mix of the adaptive algorithm and forward sequential selection. For big study lists this will keep you from being stuck in reviewland. New items are chosen in sequential order as they appear in the study list.
Adaptive Mix Random Use a mix of the adaptive algorithm and forward sequential selection. For big study lists this will keep you from being stuck in reviewland. New items are chosen in random order.
Chunky Sequential 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 appeare in the study list.
Chunky Random 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 randomly.
Leitner Sequential 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 appeare in the study list.
Leitner Random 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 randomly.
Spaced Repetition Sequential Items are scheduled according to a Pimsleur-like time table, with no regard to how well you actually know the item. New items are ordered sequentially as they appeare in the study list.
Spaced Repetition Random Items are scheduled according to a Pimsleur-like time table, with no regard to how well you actually know the item. New items are ordered randomly.
Note that the selector value is case-insensitive and you can omit the spaces if desired.
review If true, indicates that only items touched before are selected.
test If true, it puts selector in a test mode, such that items are touched only once.
newonly If true, indicates that only items not touched before this session are selected.
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.
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".

An example:

<generate>
{These are the duration items for 10 minutes:}
<duration minutes="10" selector="spaced repetition random">
{Please translate the following:}
<item language="host"/>
<pause seconds="4"/>
</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.


Learning

Learning how to use the markup template mechanism can be intimidating. Perhaps the best way is to look at lots of 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 permission from them first.

Help menuHelp menu Back