A Javascript library for XML Authoring
JavaScript HTML XSLT CSS Ruby
Latest commit 228351e Sep 14, 2015 @ssire Release 1.4 including the new localization API ($axel.addLocale / set…
…Locale) and Microsoft Edge detection
Failed to load latest commit information.
3rd-part/jquery Upgraded jQuery UI date picker to version 1.10.4; Fixed bug in tab gr… Mar 14, 2014
axel Release 1.4 including the new localization API ($axel.addLocale / set… Sep 14, 2015
contribs Removed deprecated flow feature. May 10, 2013
data/article AXEL 1.3.2 release; updated tutorial to present new $axel Javascript … Jul 14, 2013
distrib Release 1.4 including the new localization API ($axel.addLocale / set… Sep 14, 2015
docs Removed autocomplete code which was already unplugged some times ago. Oct 10, 2013
editor Added include for 'en' locale bundle in demonstration editor. Mar 24, 2015
src Fixed bug in unsafeExpando formula Aug 30, 2015
templates Added sample template to test poke, peek and flush to make active doc… Oct 6, 2014
tutorial Completed tutorial with the iframe method to create editors, complete… Aug 21, 2013
.gitignore initial commit Jan 23, 2011
README.md Extended wrapped set with functions to make Reverse Polish Notation (… Sep 30, 2013
index.html Release 1.4 including the new localization API ($axel.addLocale / set… Sep 14, 2015


AXEL - Adaptable XML Editing Library

AXEL is a lightweight, open source (LGPL v2.1), Javascript library for generating XML authoring applications that run inside the browser. Like form-based systems, such as XForms, it turns a description of a Web page with some editable fields into an editor. Unlike form-oriented systems, it is targeted at generating semi-structured document-oriented user interfaces.

You should also check the AXEL-FORMS extensions to AXEL. They provide additional constructs to create more form-oriented user interfaces. They also provide microformat instructions to easily embed AXEL into web pages.

How does it work ?

AXEL works by transforming a document template (i.e. an XHTML file with embedded XTiger XML instructions) into an editable HTML page.

How to test it ?

This repository is also published as the AXEL web site thanks to the Git Hub project pages mechanism. From the web site you can directly test AXEL inside your browser without any preliminary software installation. Follow the instructions of the section "AXEL for the impatient" of the index.html file.

The web site is regularly updated, however to really get the latest version checkout the repository. The master branch is where we push AXEL more stable releases while the devel branch is where we prepare the next release.

Where to start ?

This repository contains the full AXEL source code, documentation, examples and utilities. It is targeted at integrators and developers that want to use/debug/extend the library.

If you are just interested in using and deploying AXEL, all you need to do is to copy the axel folder to your Web server. Then you can start deploying your own document templates following the instructions in tutorial/index.xhtml.

In all the cases, you should read the readme.html after you have cloned the AXEL git repo by running :

git clone git://github.com/ssire/axel.git

The rule of thumb is that if you checkout the master branch it will contain a built of the axel/axel.js library file lined up with the code. Be aware that if you checkout the devel branch, you will need to rebuild the axel.js file following the instructions of the next section.

How to build the library ?

The library comes with the sources concatenated and minified inside axel/axel.js. However it is wised to make a fresh version by running the build.lib target in the scripts directory:

cd scripts
ant build.lib

This requires that you have the ant tool available on your system, which is already the case on many operating systems.

This requires that you install the Yahoo UI compressor onto your machine, and that you edit the scripts/ant.properties file to point to it.

You can get the Yahoo UI compressor at http://developer.yahoo.com/yui/compressor/

Alternatively the build.debug target simply concatenates source files together, so you can use it without installing the compressor.

How to extend the library ?

The basic archicture of the library is reflected into the structure of its src folder. It contains the following sort of Javascript components:

  • plugins (or primitive editors) manage user input at a single editing field level, the library currently offers some select (a drop-down selection list), text, richtext, link, photo and video plugins

  • filters can be set on plugins to specialize their input and/or output vocabulary (e.g. the wiki filter turns a text entry field into a wiki entry field)

You can extend the library by writing your own plugins or filters.

How to contribute to the library ?

First, you can subscribe to the axel-dev mailing list.

Then you can contribute your bug fixes, enhancements and extensions by:

  1. Forking
  2. Creating a branch (git checkout -b my_axel)
  3. Commit your changes (git commit -am "My contribution")
  4. Push to the branch (git push origin my_axel)
  5. Create an Issue with a link to your branch

Simple web server

You can run the auto-test or the demonstration editor directly from the file system, however this may lead to some problems transforming the templates and/or loading XML data on some browsers. This is because they will not allow the editor to transform a template loaded inside an iframe, and/or to read files from the file system because of a strict application of security policies.

An alternative solution is to access the AXEL distribution from a web server.

For instance, if you have ruby installed you may run a one line command into a terminal to start a web server serving the current directory and below (at http://localhost:3000 on the example below) :

ruby -r webrick -e "m = WEBrick::HTTPUtils::DefaultMimeTypes; m.update({'xhtml' => 'application/xhtml+xml'}); s = WEBrick::HTTPServer.new(:Port => 3000, :DocumentRoot => Dir.pwd, :MimeTypes => m); trap('INT') { s.shutdown }; s.start"

Don't forget to configure the server to serve XTiger XML template files with the 'application/xhtml+xml' MIME-TYPE, otherwise the browser will propose to save them as external documents and not transform them.

Such commands exist with other languages (e.g. python).

Coding Guidelines

We currently do not have strong coding conventions as you will see by yourself when browsing the source code, however respect at least these ones :

  • soft tabs
  • 2 spaces per tab
  • remove spaces at the end of lines (you may use a filter such as sed -E 's/[ ]+$//g')
  • test source files with jslint

Each plugin should be documented in a self-describing template file inside the templates/plugins folder.

Each filter should be documented in a self-describing template file inside the templates/filters folder.