WebJaxe

Author: Damien Guillaume

WebJaxe

En français

WebJaxe is a free CMS, to create websites with a web user interface. It works with PHP on server side, and with a Java applet or Javascript on client side to edit the contents. The editor is based on Jaxe, an XML editor working as a desktop application. Starting with version 2.0, it is possible to use Daxe instead of Jaxe (Daxe is a similar XML editor written in Dart, which can be used without a Java plugin in modern browsers).

WebJaxe can be used to edit XML documents in any XML language, with a configuration file. It is distributed with a configuration for the XPAGES XML language, a simple language designed to easily create web pages by separating content editing from the choice of a graphical interface. XPAGES is adapted to the creation of online courses, documentations, or in general websites with static content. This website, for instance, was created with XPAGES.

More information about WebJaxe.

Documentation

Download

WebJaxe can be downloaded with this link : webjaxe_2.1.zip.

To install, follow these instructions.

License

WebJaxe is distributed under the GPL license.

Brought to you by

WebJaxe was developed at the cellule TICE at l'Observatoire de Paris. WebJaxe authors are : Soufiane Ayadi, Gilles Bessou, Damien Guillaume and Konstantin Tcholokachvili.

For any information, please contact email_soufiane.png


Introduction to WebJaxe

Authors: Damien Guillaume, Soufiane Ayadi

Presentation

WebJaxe is a system to create websites with a web-based user interface, using XML technologies to ease and accelerate sites creation and updates. Several authors can participate at the same time to create a website, each one bringing his own contributions.

So, WebJaxe is a CMS, but as opposed to a CMS that lets you edit HTML code or pseudo-code close to HTML, WebJaxe works in two separate steps :


Advantages

Many CMS provide two ways to edit contents :

WebJaxe offers an alternative solution : the use of an editor with a user-friendly graphical interface, but that doesn't display right away the HTML result. In the end, this enables the creation of a website with a consistent user interface even when many authors contribute.

Since authors provide content with semantic markup without specifying the presentation, it becomes suddenly possible to change all the graphical interface at once, without having to edit the authors contributions.


Features

WebJaxe is a free software (in French, libre as opposed to gratuit). It is distributed under the GPL license.

WebJaxe can be used to edit XML files from any XML language, provided a Jaxe configuration was created for the language. To transform XML files into a website, a specific PHP script is also necessary. WebJaxe is distributed with configurations for the XPAGES and XHTML strict XML languages.

The XML editor, based on Jaxe, inherits the following features from Jaxe :

WebJaxe provides on top of that :


Installation

Authors: Damien Guillaume, Soufiane Ayadi

Prerequisites

WebJaxe is easy to install, even with free hosting providers, and works on all operating systems thanks to the use of Java for the editor.

On the server

With PHP 4, it is also necessary to install the sablotron and iconv libraries.

remarqueRemark

It is usually sufficient to install MAMP (on MacOS), XAMPP (on Linux) or WAMP (on Windows), which include Apache, Mysql and PHP. It is also possible to install the components separately, without forgetting the mysql module for PHP. Some packages have to be installed on Linux on top of PHP : php5-mysql for the link with the database, php5-xsl for XML documents transformations, and php5-gd for image processing.

For users


Installation

Activation of PHP extensions

With PHP5, the PHP extensions php_xsl and php_gd2 must be enabled, but php_domxml must be disabled (it's an extension for PHP4).

With PHP4, the PHP extensions php_xslt, php_gd2 and php_domxml must be enabled. These extensions are enabled by default in some distributions (such as MAMP on the Mac), but not on others (such as WAMP on Windows).

Placing the folder

WebJaxe's folder can be placed anywhere on the website. The website root is often a folder called htdocs, in which the webjaxe folder can be copied.

File permissions

The PHP user needs write access to the following folders : site_config, contribXML, sites, historique, poubelle and tmp. Permissions for these folders should be checked before starting WebJaxe for the first time.

ecrans_webjaxe/creation_base.png
Creating the database

Initialisation

Open the following page in a web browser :

http://[your_website]/[WebJaxe_folder]/index.php

remarqueRemark

If your web server is running on any other port than the default one (80), it is of course necessary to add :port_number just after http://[your_website].

To start with an English configuration, choose XPAGES_en as the configuration, and en for the language.

To create WebJaxe's database, the login and the password for the database administrator have to be entered (often 'root' / '' or 'root' / 'root' by default). The database is called webjaxe by default.

The other fields to fill in are used to create WebJaxe's administrator account, who will be the first user. Once this is done, click on the "Create database" button to finish WebJaxe's installation.

The mail management is used to alert for a new user, you have 3 options:

Once this is done, click on the "Create database" button to finish WebJaxe's installation.

TeX equations images server

Those who would like to use equations with the TeX syntax in the XPAGES language also need to configure a little additional server. The Jaxe applet and its XPAGES plugin do not contain a TeX processor (it would be too heavy !). So, the plugin calls a server, sending the equation text, to which the server replies with the image of the equation. This server is already present in WebJaxe's serveurtex folder, but it requires the installation of the following programs : latex, dvipng and ImageMagick. It is also necessary to edit the file config/XPAGES/XPAGES_config.xml by hand to specify the server to use (look for "tex.php" to find it). The default value is set to a server that is not necessarily available. The paths to the commands convert and tex2png can be changed if necessary in tex.php. Permissions should be checked to make sure the PHP user can write inside serveurtex/CACHE.


Securing WebJaxe

The information to access the database is stored in the site_config.xml file, located in the site_config folder. This folder is protected for the Apache web server with a .htaccess file if .htaccess files are enabled with the instruction AllowOverride in httpd.conf. This prevents reading site_config.xml directly from the web, while still letting WebJaxe use it.

This protection only works with the Apache web server. If you use another web server, such as IIS, you will need to protect the site_config folder in another way, for instance by editing its properties and forbidding reading. The way to do that is unfortunately different from one web server to another.

A .htaccess can also be added to the other folders in ordre to manage reading authorizations.

To avoid having to manage both Apache and WebJaxe users to control access, the lecture_fichier.php PHP script can be used with the Mod_rewrite Apache module. For instance, the following code can be placed in a .htaccess file in the contribXML and sites folders, to make sure that only authorized WebJaxe users can access the XML files and the websites created with WebJaxe :

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^(.*)$ ../php/partie_utilisateur/lecture_fichier.php?fichier=%{REQUEST_URI}
</IfModule>

This code redirects read requests for all files in the folder to the lecture_fichier.php script, which only returns the contents of the files for connected authorized WebJaxe users.

Aside from that, for a better protection of passwords on the network, it is recommended to use https to connect to WebJaxe.


Updating

WebJaxe's directory contains sub-directories with files specific to WebJaxe, and others with files specific to the local installation. To update WebJaxe, simply copy the sub-directories specific to WebJaxe: config, daxe, design, editeur_config, jaxe, langues, php, serveurtex as well as the file index.php. If the database has to be updated, WebJaxe will be blocked until an administrator connects.


User guide

Authors: Damien Guillaume, Soufiane Ayadi

Registration

ecrans_webjaxe/inscription.png
Registration on a WebJaxe website

To participate to the creation of a website with WebJaxe, it is first necessary to register. To do that, just go to the registration page (there is a link from the first page), and fill in the different fields.

The login is a unique identifier. A new user is choosing the login, but (as opposed to the fields for the firstname and the lastname), the only letters accepted are the letters from a to z, with no space or special character.

Choose an original password, but don't lose it ! You can ask for help to the administrator if you lose it, but changing a password is not automatic.

Once the registration form submitted, the administrator will be able to validate (or not) your registration. It is only after the registration is validated by the administrator that it becomes possible to log in, with the chosen login and password.


Login

connexion.png
Login for a WebJaxe website

To log in, just enter the login and password chosen at registration time.


Contributions

ecrans_webjaxe/liste_contribs.png
List of contributions

Creating a website is done with a number of contributions. A contribution corresponds to a set of pages on a given subject (usually less than 10 pages). A contribution is a folder containing an XML file with the text of the pages, and the files of the images used in the pages.

Certain contributions are only used to link contributions with each other. For instance, it is possible to create a contribution for the whole website to create, and this contribution will only contain links to the other contributions.

Contributions are organized into projects. A project gathers contributions and authors on a given subject. All the authors in a project can edit all the project's contributions.

As a user, you can create a new project, a new contribution, and edit the contributions created by other users if these contributions are in a project of which you are author. The administrator can add authors or contributions to a project.

A project can be exported. This operation starts the download of a ZIP file containing a copy of all the contributions in the project.


New contribution

ecrans_webjaxe/nouvelle-contribution.png
Nouvelle contribution

There are two methods to create a new contribution in WebJaxe: the creation of an empty contribution, and the import of an existing contribution. In both cases, it is necessary to specify the associated project and the Jaxe configuration (which corresponds to the XML language).

In the case of an import, the imported file must be a ZIP file with the name of the contribution. This ZIP file must contain a folder with the name of the contribution, containing an XML file with the name of the contribution. For instance, the imported file could be "my-contribution.zip", containing a "my-contribution" folder, with a "my-contribution.xml" file inside.

Since contribution export uses the same organization, it is easy to export a contribution from a WebJaxe site and to import it into another one.


Operations on a contribution

ecrans_webjaxe/operations_contrib.png
Possible operations on a contribution

There are 10 possible operations on a contribution :


Edition of a contribution

ecrans_webjaxe/jaxe.png
Edition with Jaxe

WebJaxe's editor requires Java 1.6. It opens in a new window. Be careful not to close the initial window in the web browser, because that would make the edition window disappear without letting you save the document.

remarqueRemark

There is a bug in Firefox and some other web browsers which prevents reading XML files if the option "Allow third-party cookies" is disabled. With these web browsers, this option must be enabled in the preferences. Another solution is to add an "exception" in the cookie settings so that cookies from WebJaxe's server are always authorized.

The editor works with the XML meta-language, and entered texts are thus organized with begin and end tags. Each piece of text is surrounded by tags that give it meaning. New elements can be inserted with the menus, or with the insertion panel on the left of the window. The insertion panel only displays elements that are allowed at the cursor position, in order to prevent the creation of an invalid document (a document that does not respect the rules of the chosen XML language).

The available elements, as well as the tree rules for the elements, are defined by the XML language chosen by the administrator. It is important to learn the chosen language to use the editor in the best way. A specific documentation exists for the XPAGES language, whose WebJaxe configuration is provided with WebJaxe.

There exists a user guide for the Jaxe application, that mostly applies to WebJaxe's editor. However, there are some features that don't exist in WebJaxe. Some other features are disabled because of security restrictions imposed to Java applets by web browsers, such as copy/paste (see below).

Copy / Paste

By default, Java applets are not authorized to read the system clipboard. In general, this means it is not possible to do a copy-paste from another application. There are two methods to work around this problem:


Associated files

ecrans_webjaxe/fichiers_associes.png
Management of associated files

This page is used to manage the files associated to a contribution. They are usually files of images used when editing the XML document. It is possible to organize these files with directories. To add a new file, just click on the corresponding button, choose the file on the local hard disk, and click on the "Add" button. It is then displayed in the list of files for the current directory.

Once an image file is added, it is possible to use it during edition. For instance, with the XPAGES language, an image is added by first creating an "Image environment", and then adding a "File" inside. The path to the image file in the contribution is used as the "file name", for instance "logo.png". The image is displayed in the editor when the dialog is validated.


Changes history

ecrans_webjaxe/historique1.png
Operations on a contribution: Changes history

The Changes history button displays when the XML document is changed.

ecrans_webjaxe/historique2.png
Changes history

Each history is followed by the login of the author who has changed.

ecrans_webjaxe/historique3.png
Comparison with the latest version

You can compare versions of the XML document, and check the differences between each version of the document and the latest version.

ecrans_webjaxe/historique4.png
Differences between each version of the document and the latest version

Preferences

ecrans_webjaxe/preferences.png
User preferences: Change the language, the user password or email

Change the user interface language. The default language is one that was chosen during the registration on WebJaxe.

The new password must use at least 4 characters, and must contain only letters without accent, numbers, dashes or underscores.

The email adress must be valid.

Starting with WebJaxe 2.0, it is possible to choose the editor. Jaxe, the default editor, works as a Java applet and requires an enabled Java plugin in the web browser. Daxe works with Javascript and requires its activation. Daxe only works on modern web browsers (for instance, it does not work with Internet Explorer before version 9).


Search

ecrans_webjaxe/recherche.png
Do search

This page allows the user to search for a keyword in all the contributions of a project.


Administrator guide

Authors: Damien Guillaume, Soufiane Ayadi

The administrator account

The administrator account is created at initialization time. It is possible to change the fields for this account in the user management section.

It will be assumed for now on that you are connected to the site as the administrator, which enables the administrative functions.


Parameters and uninstall

ecrans_webjaxe/parametres.png
Site parameters

The parameters page lets you edit the following parameters :

remarqueHint

It is possible to use "../.." instead of "sites" for the name of the websites folder, so that websites are generated directly at the web server root (assuming the webjaxe folder is located at the root). If you use this trick, be careful with possible folder names conflicts.

Uninstall

To remove the database and the contributions, just click on "Uninstall WebJaxe". Warning, the result is immediate !

Once this is done, you just need to remove WebJaxe's folder on the server to get rid of it completely.


Validation of registrations and user management

ecrans_webjaxe/utilisateurs.png
User management

Each registration request is recorded in the database, but the corresponding users cannot connect until their registration is validated by the administrator. If the administrator rejects a registration, it is deleted.

The list of registration queries on the "User management" page gives the list of the users who registered, and lets you accept or not each registration.

From the user management page, it is also possible to :


Project management

ecrans_webjaxe/projects.png
Project management

The project management page is used to create new projects, and change the list of contributions and participants for each project. There is no direct link between contributions and users: the links are established through the projects.

The administrator can organize projects as a tree, which is handful when there are a lot of contributions. To change the tree structure, click on the "Sub-projects" button for the parent project on the project management page. The list of sub-projects can then be changed for this project. A user associated with a project is implicitely associated with all the descendant projects. An export of the parent project will contain all the contributions of the parent project and its descendants.


Contribution management

ecrans_webjaxe/contributions.png
Contribution management

Each contribution is associated with a single project.

The contribution management page gives the list of the contributions, and can be used for each contribution to change the associated project, to edit it or remove it.

A form at the bottom can be used to create a new contribution.

This page can also be used to edit a contribution (by redirecting to the "user side" of WebJaxe), and to remove a contribution.


Adding a new configuration

WebJaxe is distributed with a configuration for the "XPAGES" XML language (in French and in English), and another one for the "XHTML strict 1.0" XML language. It is possible to add new configurations to edit documents in other XML languages, and generate corresponding websites.

To add a new configuration, that we will call "MYCONFIG" :


The XPAGES language

Author: Damien Guillaume

Introduction

introductionIntroduction

XPAGES provides a way to create websites quickly and easily. XPAGES is based on the principle of separation between content and presentation : with XPAGES, the content (text, images, animations) is entered, and is structured with a meaning associated to each part. An author does not worry about the way content will be displayed later on, which saves time and avoids mixing meaning with presentation. The way content will be displayed is specified separately, with stylesheets. Thus, it is possible to change the display independently from the edition.

XPAGES is an XML language, i.e. a set of elements and rules designed to structure a text. Associated stylesheets can automatically transform XPAGES documents into HTML files so that they can be viewed on the web. XPAGES documents can be edited with Jaxe and WebJaxe thanks to a configuration file describing the edition user interface.

XPAGES is a very simple language, easy to learn : it features only 59 elements (46 without the exercises), to compare for instance to the 91 elements in HTML, 390 elements in DocBook, or 526 elements in OpenDocument.


Documents structure

Organisation
organisation_xpages_en.png

XPAGES documents have a root element, XPAGES set, that is used in all the documents as a first level element. Under this element, the following elements can be found : Informations, Page, Ref. XPAGES document and XPAGES set.

Inside a page, sections can be created with the Section element. This element has a title, a role that specifies the meaning of the section and can result in a different display for each function, and an importance that can be used to highlight the section if it is important.

The text is added inside paragraphs, with the Paragraph element. It is easy to insert a new paragraph with the command-P or control-P shortcut in Jaxe.

It is possible to create several contributions, each one containing an XPAGES XML file and the associated files (images, Java applets, ...). Each contribution corresponds to a folder whose name is the same as the label given in the Informations block in the XML file. This folder contains the XML file and the associated files.


Informations

The information block provides information about the document, and is also used to choose a skin for the generated website. It is required, and is located at the beginning of the document. It has the following children :


Block elements

Block elements are XML elements that can be directly inserted inside a Page element. They are used to structure the document, but are not mixed with text : it is not possible to insert text directly under Page, because text must necessarily be inside a block element.

XPAGES has the following block elements :


Elements mixed with text

Some XPAGES elements can be mixed with text, for instance inside a paragraph. They are the following elements :


Exercises

XPAGES can be used for many applications, but it is especially handy to create online courses, and was created in this context. For these reasons, the language contains elements specific to the definition of exercises, even though these elements might not be useful outside of the context of online courses.

There are two types of exercises : the question-answer type (Exercise element), and the quiz type (Quiz element). In both cases, an exercise can have a title (title attribute), an indication of the difficulty (Difficulty element), an indication of the time necessary to complete the exercise (Time element), and questions (Question and Quiz question elements).

Each question can have terms (Terms element) and one or more helps (Help element). Questions of type question-answer have a solution (Solution element) and a number of points that can be granted if the answer is correct (Points element). Questions of the quiz type have possible answers (Quiz answer element), each answer being either right or wrong (correct attribute), with the text of the answer (Answer text element) and a comment which will be displayed to the user should he choose this answer, for instance to explain why the answer is wrong (Answer comment element).

In Jaxe, solutions for evaluation exercises are not added to HTML when the "public website" is generated. They are added when the "production website" is created. WebJaxe always creates the production website. To create a public website from a contribution in WebJaxe, the contribution has to be exported and opened with Jaxe. In this way, it is possible to create, from the same XML files, a website for students, and another one for tutors for an elearning program.