Anouncing saxon-serv

I'm thinking of trying out HAppS in an attempt to further my understanding of Haskell. Looking at one of the examples, I noticed that there was a plea for a server that exposed Saxon so that a new JVM wouldn't need to be invoked every time you style a page just to have access to XSLT 2.0.

Here it is

The code is available in a Mercurial repository.

It's pretty simple:

  1. Check out the code: hg pull http://hg.crimzon.ath.cx/saxon-serv/
  2. Move into the directory: cd saxon-serv
  3. Make start the server: ant serve

This starts the server listening on http://localhost:8080/. This servlet embeds the Winstone Servlet Container so once the WAR is built, you can either start it directly:

java -jar dist/saxon-serv.war

or deploy the WAR using whichever servlet container you prefer.

API

The API is very simple, POST a request to the servlet's root (http://localhost:8080/) with the following arguments:

xml:The xml document to be styled.
xslt:The xslt stylesheet to be applied.

I've not yet actually used HAppS for anything yet, so other than pretty printing some very basic xml this server has been completely unused. As such the API and the server's functionality will probably evolve as I use it.