Re: [xsl] XSLT translated into C/C++

Subject: Re: [xsl] XSLT translated into C/C++
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Sat, 21 Jan 2012 20:00:22 +0000
On 20/01/2012 18:36, Rand McRanderson wrote:
Hi Everyone,

I was curious about if there was any implementation of XSLT which
translated it first into a compiled language. Any one know of any
commercial or open source projects along these lines? How about any
implementations that compile a stylesheet into Java bytecode?


Way back in 1999, a very early version of Saxon included Java source code generation for a subset of XSLT - with the translation from XSLT to Java being written in XSLT, no less. It wasn't very useful (it generated really bad code) and was quickly abandoned.

More recently, in Saxon 9.4 released last month, Saxon-EE now does on-the-fly bytecode generation for selected parts of your stylesheet, mixing compiled code and interpreted code freely so either can call the other.

This isn't exactly new, though: the XSLTC product, which became part of Xalan, was probably the first to make a major feature of code generation.

For a discussion of what to expect from code generation, at least in Saxon, see

http://www.balisage.net/Proceedings/vol7/html/Delpratt01/BalisageVol7-Delpratt01.html

Michael Kay
Saxonica

Current Thread