The most common attributes in eLML

In eLML nearly every element does have a specific set of attributes you can use. The attributes are usually specific for an element and thus are described in the chapter about the top level elements or the content elements. But certain attributes are available for nearly all the elements in eLML and these general attributes are described on this page.

label and labelRef Attribute

The "Label" is the ID that you set for an element. It can have up to 25 characters, numbers or underlines (special characters are not allowed). It is mandatory for the root element "lesson" and its child element "unit". But you can set a label for nearly all the elements in eLML. The label is used to generate filenames or to create anchors within a file. In the online version the label is transformed into an "id" attribute and thus allows the users to reference the object. The following elements will make use of the label-attribute:

  • Link element: With "targetLabel" you can jump to another place within your lesson or with "targetLesson" you can jump to another lesson. Both use the label-attribute as input value.
  • Referencing/highlighting other parts of the lesson using labelRef-attribute (see below)
  • Configuration file: When creating modules or defining optional units in the config file you'll need the according label

Many eLML content elements do also offer a labelRef-attribute. Using labelRef you can reference another part of the lesson and thus make sure they belong together. This could be used for example for highlighing (move your cursor/mouse over the following text): "Understanding the label-attribute is imperative before using the labelRef-attribute". The first paragraph that defines the label-attribute should highlight dark green, when you move your curser over the last sentence. To enable this simple java script in eLML define a color for the $use_labelReferences parameter listed in the "online" section of your configuration file.

But this is just one example of how you can use the labelRef attribute. You can of course build your own scripts or use-cases around this features. The basic meaning of the attribute is that you can reference or "connect" one part of your lesson (a character, a sentance, a whole paragraph, a list, a list item etc.) to another part of your lesson that you have defined with the label-attribute.

title and navTitle Attribute

For all the elements that appear in the navigation (lesson, unit, learningObject etc.) or that could potentially appear on one single HTML page, you have to set a title. Other so-called top-level-elements like summary, selfAssessment or furtherReading do have default titles that appear if you dont define a title yourself. You can override these default titles in the configuration file, by the way. All these elements offer you the possibility to set an optional navTitle-attribute used for the navigation (or the manifest-file, if you create SCORM or IMS CP packages) only. Usually the title-attribute is a longer title displayed on top of a page and the navTitle is a shorter version of the title used in the navigation on the left side.

Then there are content elements which offer you the possibilty to set a title displayed within a page. These titles dont appear in any navigation and thus they do not offer a navTitle-attribute.

icon Attribute

important

Most content elements offer an icon attribute. Using this attribute you can mark certain paragraphs, boxes or lists as "important", "remark" or "question". eLML then puts the according icon on the left of the paragraph or box. The idea of this icon is to help visualize for the student "important" (or "question" etc.) paragraphs but if you want you can also write an XSLT function that summarizes all the "important" paragraphs on one page.

The icon-values can be customized, you dont have to use the default values important, remark etc. To customize the icon-values open your validate.xsd schema file, search for "icon" and replace the value list with your own values.

eLML expects the icons to be in the folder yourproject/_templates/yourtemplate/icons/. For every icon-value there has do be an according file in the "icons" folder, so if you have an "important"-icon then eLML expects an "important.png" file in the "icons" folder. PNG is the default format but if you choose to use JPEGs or GIFs you can define the icon file format in the configuration file.

Who can see what? role and visible attribute

In eLML you can create a students- and a tutor-version of a lesson. In the students version certain meta-information or solutions is hidden from the user. In the tutor-version this information is displayed. Using the "role" attribute you can mark the following elements to be only visible for tutors:

  • unit: Write a whole unit only visible for tutors
  • lObjectives: If you have certain goals that you want to hide from the student, mark them role=tutor and only tutors will see those learning objectives
  • content elements that can be visible for tutors only: table, paragraph and link

But you can not only customize your content based on your target audiance, you can also customize it based on the target format. Using the "visible" attribute eLML allows you to mark which content is only visible in the online-version or in the print-version, in none of those or in both (default). Here is an overview about what will be displayed in which output format when you are using the visible-attribute:

  • visible=online: XHTML, IMS CP, SCORM, YAML and of course if you use your own online layout
  • visible=print: XSL-FO/PDF, LaTeX, ODF, DocBook and ePub/eBooks

As a rule of thumb: All the formats that allow playing movies and flash animations are considered "online" and the other formats are considered "print". So since eBooks dont allow containing flash files, ePub format is considered "print".



up