eLearning Markup Language
Navigation Line
Go to previous page

eLML news:

Transforming your eLML lesson

Please note: The examples below all refer 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

One comment if you work with oXygen: If you have transformation errors, fix them and re-transform the lesson, oXygen will only tell you in the status line (bottom left side of window) if the lesson has successfully been transformed or not. The error messages from the last transformation remain and you have to doubleclick them and use the red cross button "Clear Validation Markers" to remove them. A bit strange in my opninion but you get used to it.

Transform a lesson without a layout template

  1. Open the "Introduction to Database Systems" lesson XML file in oXygen or XMLSpy.
  2. In oXygen click on the "Apply transformation scenario" button. Since you didn't yet define a "Transformation Scenario" you will need to do this now. Its pretty straight forward but refer to the oXygen manual if you don't know how to do it. In XMLSpy just click the "XSL" button.
  3. Choose the file ../../../../core/presentation/online/elml.xsl file as input XSLT file (in oXygen you also have to define an output folder: enter eg. tmp/output.txt but it doesnt really matter since the exact paths for storing files are part of the XSLT 2.0 files anyway).
  4. Open the file gitta/IntroToDBS/en/index.html with any web browser (in XMLSpy the files are opened automatically).

Transform a lesson with your custom layout template (e.g. 'gitta')

  1. Open the "Introduction to Database Systems" lesson XML file in oXygen or XMLSpy.
  2. This time use the following XSLT file for transformation: gitta/_templates/gitta/online.xsl
  3. Open the file gitta/IntroToDBS/en/index.html with any web browser (in XMLSpy the files are opened automatically).

You should now see the same lesson but in the blueish "gitta" layout.

Create a PDF version of your lesson (oXygen only, see remark below)

  1. Open the "Introduction to Database Systems" lesson XML file in oXygen or XMLSpy.
  2. This time use the following XSLT file for transformation: ../../../../core/presentation/print/elml.xsl
  3. In your oXygen transformation scenario click the "Perform FO Processing" mark in the middle tab and enter a "real" output path. For example you can enter ${cfd}/${cfn}.pdf and oXygen stores the PDF file in the same folder as your XML file.

XMLSpy remark: The "pdf" button somehow does not work because it issues errors while transforming. But if you first create a "FO" file (using the XSLT transformation) and then process this file with the "PDF" button, then it works. I have no idea why it works in two steps but not in one. Any help is appreciated.

How to customize eLML?

Customization 1: The eLML configuration parameters

Within your project folder you should have a file _config/config.xml (if you don't have it: copy the default_parameters.xml file from the core/presentation folder to your project and rename it to conifg.xml) that allows you to change many parameters for the online, the print or for both versions and also all the translation for gerneric terms. The configuration XML file should contain a short explanation for each parameter. You are free to delete elements of the configuration file or the whole config.xml file. In this case, for each missing parameter eLML will use a default value.

Customization 2: Adapting the eLML CSS file

As of eLML version 3.0, the created XHTML code fully builds on CSS. This means that many attribute values (like alignment) will not be displayed correctly if you don't use the CSS file. We recommend to take e.g. the "plain" layouts CSS file and adapt it to your needs. You will surprised at how sophisticated your layout can be just by adapting the CSS file! For more information please read the CSS chapter.

Customization 3: Creating your own XSLT templates

In your "online.xsl" file of your template folder you can create your own templates. If you use the online.xsl file to transform your lesson (be sure to import the main ../../../../core/presentation/online/elml.xsl file!) then the templates defined there will be used and default templates will be overridden. Have a look at the existing examples to become familiar with the online.xsl file.



up

Go to previous page
Go to next page
pdf version
Glossary
help