Context Information
...
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
- Open the "Introduction to Database Systems" lesson XML file in oXygen or XMLSpy.
- 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.
- Choose the file
../../../../core/presentation/online/elml.xslfile as input XSLT file (in oXygen you also have to define an output folder: enter eg.tmp/output.txtbut it doesnt really matter since the exact paths for storing files are part of the XSLT 2.0 files anyway). - Open the file
gitta/IntroToDBS/en/index.htmlwith any web browser (in XMLSpy the files are opened automatically).
Transform a lesson with your custom layout template (e.g. 'gitta')
- Open the "Introduction to Database Systems" lesson XML file in oXygen or XMLSpy.
- This time use the following XSLT file for transformation:
gitta/_templates/gitta/online.xsl - Open the file
gitta/IntroToDBS/en/index.htmlwith 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)
- Open the "Introduction to Database Systems" lesson XML file in oXygen or XMLSpy.
- This time use the following XSLT file for transformation:
../../../../core/presentation/print/elml.xsl - 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}.pdfand 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.
Create a Latex version of your lesson
- Open the "Introduction to Database Systems" lesson XML file in oXygen or XMLSpy.
- 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.
- Choose the file
../../../../core/presentation/latex/elml.xslfile as input XSLT file (in oXygen you also have to define an output folder: enter eg.output.txtbut it doesnt really matter since the exact paths for storing files are part of the XSLT 2.0 files anyway). - Open the file
gitta/IntroToDBS/en/latex/IntroToDBS.texwith any web browser (in XMLSpy the files are opened automatically).
For more information please read the separate Latex chapter.
Adapt the transformation process to your needs - the config.xml file
You have several possibilities to adapt the transformation process and the output of the transformation to your needs. Most of them are combined in the project specific config.xml file which lies in the _config folder of your project.
Create a new config.xml file
The simplest way to create a config.xml file for your project is to take a config.xml file from another project and adapt
it to your needs (save the adapted file in the _config folder of your project). Please ensure that the copied config.xml file
contains (in the root element) the reference to the config.xsd file (the XML schema for config files in the eLML core folder)
which allows you to validate your file against the predefined structure.
If you need to start from scratch create a new XML document and use the config.xsd XML schema document (in the eLML core folder)
for structuring your document correctly and for validation.
The parameters in the config.xml file
The root element of the config.xml file is config. Subelements of it are general, online, print, modules* and terms* (* means optional). The subelements contain several parameters that allow influencing the transformation. They are described in detail below.
Elements of the section general
| element | values | description |
|---|---|---|
| contact | an email address | Enter the contact Email that students will use to contact the tutor of the course. |
| server | an url | Enter the URL to your servers home page. |
| role | "tutor" or "student" | The transformation with role set to "tutor" shows all the information that is available for students but additionally the tutor information within the lesson (if such information was added, several elements have the attribute role which can be set to tutor and thus the content made available for tutors only). Transformation with role set to "student" shows only the content available for students. |
| pagebreak_level | "oneoutput", "lesson", "unit" or "lo" | "oneoutput" transforms all lessons into one single file (html, pdf,...) "lesson" transforms the current lesson into one single file (for the transformation of a single lesson the output of "oneoutput" and "lesson" is the same) "unit" starts for each unit a new file (html) or a new page (pdf, latex,...) "lo" starts for each learningObject a new file (html) or a new page (pdf, latex,..) |
| chapter_numeration | "yes" or "no" | Switch on ("yes") or off ("no") the automatic numeration of the chapter headings (in the headings and in the table of content). |
| manifest_type | "ims", "scorm" or "both" | Defines what type of standardised imsmanifest.xml file will be produced. See section Creating SCORM and IMS Content Package for LMS import for more information. |
| optional_units | subelements labelname filled with valid unit labels from the lesson to be transformed | Units listed here are marked special so that the student knows that those units are optional learning material. |
Elements of the section online
| element | values | description |
|---|---|---|
| bugtracker | url | Enter an URL to your bugtracker form here. Don't use the element if you don't have a bugtracker in your project |
| use_navigation | "yes" or "no" | Switch on ("yes") or off ("no") the display of the navigation. |
Elements of the section print (used only for pdf, etc.)
| element | values | description |
|---|---|---|
| display_links | "yes" or "no" | Links are also clickable in the PDF version. Should additionally the link URI be written in brackets after the link text? Choose "yes" or "no". |
| fop_version | "0.2" or "0.9" | If you use the latest FOP version enter the value "0.9", otherwise use "0.2" |
| pageheight | The height of your page (eg. "29.7cm" for A4). | |
| pagewidth | The width of your page (eg. "21cm" for A4). | |
| fontsize | Your default font size (eg. "11pt"). | |
| lineheight | Your default line height (eg. "15pt"). | |
| fontweighttitle | Your default font weight for titles (eg. "bold"). | |
| converter_pixel_mm | 0.2646 | The conversion factor from pixel to mm (do NOT change, should be "0.2646"). |
Elements of the section modules - allowing the transformation of several lessons into one course
| element | values | description |
|---|---|---|
| course | subelements labelname with valid lesson labels | List the labels of all lessons which build together a coures |
| attribute subnavigation of element course | "on" or "off" | Switch on or off the subnavigation. |
| attribute title of element course | some title | Define the title of your course. |
| attribute authors of element course | author names | List the most important authors of your course (they will be shown e.g. on the first page of the pdf. All authors will still be visible in the metadata of each lesson. |
Elements of the section terms
| element | values | description |
|---|---|---|
| msg with attributes name and lang | term in the language specified in the attribute lang | Enter your own term for specific predefined terms. |
How to customize eLML?
Customization 1: The eLML configuration parameters
See above, section Adapt the transformation process to your needs - the config.xml file.
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.