Context Information

...

The eLML folder structure

The core folder structure

Within eLML you always have a "core" folder, which contains general XML schema and XSLT transformation files used by all project members, and one or more project folders (on the same hierarchical level) that contain your lessons (XML file) and project specific configuration and layout template data. If your project is called "Alpecole", then the basic structure will look like shown in the screenshot to the left. Of course you can have more than one project folder but you will always have only one "core" folder.

The eLML core folder

Within the eLML "core" folder there are three folders whose contents are as follows:

  • structure: The eLML XML Schema XSD files, the “heart” of eLML! See the last chapter.
  • presentation: Here you will find the XSL files to generate XHTML, FO (PDF) etc. (see below)
  • manual: An automatically generated reference for all eLML elements and attributes available.

Now let's have a closer look at how the presentation-folder with the XSLT files is built up:

  • online: XSLT files needed to convert your XML file to XHTML 1.0 and to create content packages for online viewing of the lesson.
  • print: XSL files needed to convert XML to Formatting Objects (PDF, rtf) for printing the lesson.
  • default_parameters.xml: This file is used if you don't have a config.xml file defined in your project.
  • terms.xsl: This file is responsible for creating the term keys in the according language.

The "online" folder contains all the main XSLT files to convert your lesson XML files (that were validated by the eLML XML Schema) into XHTML. The elml.xsl is the main file that can be used for transformations into a plain HTML layout. It will transform all the elements defined in the XML Schema into XHTML 1.0, but it does not contain any layout tags. It looks for the /yourproject/_config/config.xml file for parameters like the pagebreak level, the contact email address or the server home URL. If this file does not exist, then it just uses the default_parameter.xml file that is part of the core folder. You can copy this file to your projects "_config" folder and rename it to config.xml and you have your own configuration file. The configuration file contains important parameters and path names that should be adjusted before using eLML. Since the bibliography is interchangeable in the XML Schema, the XSL files are as well. The biblio_hardvard.xsl file transforms all the elements defined by the biblio_harvard.xsd file. If you plan to use your own bibliography XSD file, then be sure to also create your own bibliography XSL file (read below how to use it).

The "print" folder contains all the XSL files for creating Formatting Objects (FO) out of your lessons, which then can be transformed to PDF or RTF. It is basically built up the same way as the "online" folder and also uses the same config.xml configuration file. It was created using the Apache FOP engine, works with both the stable 0.25 and the beta 0.9 version (you have to define the one you are using in the config.xml file!) but it should also work with other formatting object processors. Please post any comments about the use of eLML with other engines on our website or send us an email! Thank you.

The "terms.xsl" file is responsible for creating the term keys in the according language. If a key is defined in a projects config.xml then it takes its value from there. This way each project can define how terms like bibliography or further reading are translated. Please refer to the config file of the "elml" or "gitta" project for examples. If no personalization is used the terms are taken from the according XML file within the core/presentation/terms folder. Currently we provide translations for German, English, French and Italian. If a certain language is not available then the processor automatically uses the English term as "fallback".

The project(s) folder structure

Now that you know how the "core" folder is built up, you will have to know how to create your own project folder. In the screenshot above you already saw the "alpecole" project. Typically your project folder has short, lowercase name and resides on the same level as the "core" folder. It contains at least the following three subfolders:

  1. _config: Contains the following two configuration files:
    • _config/config.xml: The configuration file allows you to define the pagebreak level, the contact email address, the home URL and much more. You can also define your own translations for general terms (see above). It is used automatically when transforming XML files.
    • _config/validate.xsd: The validate.xsd file should also be opened and adapted to your own needs. It is used as the main file for validating your lesson!
  2. _templates: As the name suggests, it contains the layout templates for your project. There should be at least one template preferably with the same name as your project folder.
    • _templates/yourtemplatename/online.xsl: Here you can define your own templates to create a unique layout (read below for more information about customization)
    • _templates/yourtemplatename/elml.css and elml_print.css: These CSS files are used for viewing and printing of XHTML versions of a lesson. eLML totally relies on CSS, so you will have a lot of customization options just by adapting the elml.css file alone (without creating customized templates). Read the eLML CSS-guide for more information.
    • _templates/yourtemplatename/elml.js: Contains JavaScripts used by eLML elements (e.g. popup).
  3. lessons: On the same level you have your eLML lessons. Each lesson has its own folder that should be named identically as the lesson label you will have to define. A "lesson label" is a unique identifier (ID) for each lesson, should be lowercase only and have less then 11 digits with no special characters in it.