Back to Home Back to Desktop View

Validation

Validating your eLML lesson

To understand how validation in eLML works you must understand that the eLML XML Schema consists of two parts:

  1. General part: This static part of the XML Schema is located in the "core" folder and should not be altered.
  2. Project-specific part: This dynamic part is located within your projects "_config" folder (called "validate.xsd") and can be customized to your project's needs.

To validate you will always use your projects "_config/validate.xsd" file and never the "core" files since the "validate.xsd" file automatically imports the "core" files. For more information read the schema chapter.

Validate an existing eLML lesson

Validate an existing eLML lesson

Please note: The examples below refers to the GITTA lesson "Introduction to Database Systems" that is included in the stable version. You will find the lesson XML file here:

gitta/IntroToDBS/en/text/IntroToDBS.xml

  1. Open the "Introduction to Database Systems" lesson XML file in oXygen or XMLSpy.
  2. Click on the "validate" button (and you should get a "Document is valid" message).

Validate a new eLML lesson

Validate a new eLML lesson

If you created a new eLML lesson and want to validate it you must first reference the eLML XML Schema within the lesson. Here is how you do this in Eclipse/oXygen:

  1. Create a new lesson file. Refer to the manual for more information about this step.
  2. In Eclipse save the new lesson XML file using the "New..."-wizard, enter the file name and choose the location where to save your XML file. Please refer to the eLML folder structure and store it within your lessons "text" folder.
  3. Click "Next..." (not "Finish"!) and you will be able to reference an XML Schema.
  4. Choose the "XML Schema" tab and click on right folder icon to select your projects "validate.xsd" file.
  5. The menu "Document root" in the same window should now become an active pulldown menu. Choose the "lesson" element as root tag.
  6. The namespace should also be filled in automatically and the prefix should stay empty as we want to work with the default namespace (you can also enter "elml" as Prefix if you prefer working this way).
  7. We recommend to check the second checkbox "Add first Choice particle" but not the first one.
  8. Now you can click "Finish" and your lesson XML file with the correct schema declaration will be created.

Generally speaking, add the following attributes to your "lesson" root element:

<lesson label="lessonlabel" title="My Lesson Title" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.elml.ch ../../../_config/validate.xsd">

Validate your configuration file

Validate your configuration file

You can use a configuration file to control the transformation process in eLML. This config.xml file can also be validated using a separate schema. Please refer to the configuration page for more information.