W3C home > Mailing lists > Public > www-xsl-fo@w3.org > June 2003

[ANN] FreeMarker as an alternative to XSLT

From: Jonathan Revusky <jon@revusky.com>
Date: Wed, 25 Jun 2003 12:03:34 +0200
To: www-xsl-fo@w3.org
Message-ID: <bdbs1b$8l9$2@main.gmane.org>


I thought this could be of interest to people on this list.

FreeMarker is a 100% java library of some vintage. It was originally 
designed for the java servlet space, to keep presentation logic (HTML 
stuff) separate from the back-end application logic. However, it is a 
very useful tool for any application that needs to generate text. Other 
well-known tools in this space are Velocity and WebMacro.

FreeMarker 2.3 introduces some powerful new XML processing functionality 
that should make it an appealing alternative to XSLT for many people. We 
have introduced some new directives -- <#visit> and <#recurse> -- that 
provide functionality roughly equivalent to the <xsl:apply-templates/> 

We believe that FreeMarker will be a lot easier for most people to learn 
and use than XSLT. The basic programming language available in 
FreeMarker templates is much more readable (less verbose) than XSLT and 
the underlying procedural logic will come more naturally to most people 
than the declarative/functional programming model embodied by XSLT.

We don't have rigorous benchmarks ('rigorous benchmarks' may be an 
oxymoron anyway) but initial indications are that FreeMarker is a lot 
faster than XSLT. And I mean *a lot* faster. For example, FreeMarker's 
manual is maintained in a canonical Docbook XML format. Previously, we 
generated the final HTML output using using some XSLT stylesheets by 
Norman Walsh. The XSLT transformation was rewritten in FreeMarker, and 
runs 15x faster than the previous XSLT-based system using Saxon. Also, 
the FreeMarker templates are less verbose and seem more maintainable 
than the XSLT stuff was. You can see the FM-generated FM manual here: 
http://freemarker.org/docs/index.html and the chapter specifically on 
using the tool for XML processing is here: 

Though the latest version is still labelled a preview, the codebase is 
really quite solid at this point. The main reason for the preview label 
is that we are still more open at this stage to changes and proposals 
than we would be if this were labeled release candidate or final. We are 
*very* interested in feedback from hard-core XML and XSLT type people. 
This is your chance to have some input into how an XML transformation 
tool should work. (I suppose most of you never got any input into how 
XSLT works. :-))

Best Regards,

Jonathan Revusky
lead developer, FreeMarker project, http://freemarker.org/
XML transformation with FreeMarker http://freemarker.org/docs/xgui.html
Received on Wednesday, 25 June 2003 07:55:39 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:58:27 UTC