A Java implementaion of Haml (XHTML Abstraction Markup Language).
Haml features not currently supported:
-
Interpolation. (Handled by Grails if rendering to GSP)
-
Ugly mode for faster rendering speed.
-
Interpreting lists as attribute values, e.g. {:id => [:a, :b]} yields id='a_b'
-
Whitespace removal with '<' and '>'
-
Multiline with |
-
Escaping of expressions with '!=' and '&='
-
Attribute Methods
-
Object References: []
-
'encoding' option
Is is possible to use the related project Sass/SCSS from Java by using JRuby. Emil Hernvall is also working on a Java port of SCSS, called SassyBarista. The similar CSS framework LESS can be called from Java with Mozilla Rhino, as the Asual project does.
String html = new JHaml().parse("some haml");
Integration with Spring MVC 3 is in progress, with other frameworks to follow. The biggest barrier is taglib support. Contact me if interested.
JHaml was created by Ray Myers, with very special thanks to the implementers of the original Haml for Ruby, Hampton Catlin and Nathan Weizenbaum.
This implementation is licensed under the GNU GPL version 3.0 OR Apache 2.0 at your option. The libraries it depends on are licensed as follows.
Google Guava: Apache 2.0
Apache Commons Lang: Apache 2.0
markdownj: BSD