[ANN] amrita-0.8.5 and amx

I relased amrita V0.8.5. It is a html/xhtml template library for Ruby.
Get it from


This release contains a new experimental feature “amx”: AMrita
eXtention for XML. amx is a yet another style-sheet, a command-line
tools that converts an XML document into a HTML document.

I used amx to generate the top page of amrita home page. The source
document of it is like this.

<?xml version="1.0" ?> <?amx href="index.amx" ?> amrita home page .....
  <section title="amrita home page">
       Amrita is a a html/xhtml template library for Ruby. 
       It makes html documents from a template and a model data.

amx uses template ( “index.amx” ) and a Ruby class optionally.

The template is also an XML document. It contains amrita’s template
like this.


The id attribute values like “header_title” are mapped to Ruby methods
of “AmritaDocumentTemplate” in “amritadoc.rb”. Both names are
specified in root element.

These methods returns REXML element of source document …

def header_title

or Objects created by REXML elements.

def sections
doc_root.elements.to_a(‘body/section’).collect do |sec|

For detail, you can see the full source code of these files from


I did not fixed the spec of this feature yet because I don’t know
about XML well and I am not sure this is useful. But I’m pleased with
it myself and I think this framework may be extended easily to support
wide variety of needs.

If you are interested in this, please mail me your need for XML with

  • source XML document
  • desired HTML output

If I think it can be treated by amx, I will make a template and Ruby
class for it to make it another sample of amx. And if enough samples
are collected, I will fix the spec of this feature and make it an
official feature of amrita (or spearate it from amrita adn release it
as a independed package).


Taku Nakajima