XSLT Compilers

ziggy on 2002-05-15T02:48:36

Gregor is a second-generation, proprietary XSLT-to-Java compiler project. It's written by the same guy who worked on XSLTC at Sun.

XSLT is effectively a Scheme system with a wildly different syntax. Why does it seem that this is the only guy working on compiling XSLT into something compiled (like Java bytecodes)? Could it be the simple fact that there are preciously few people who feel that implementing an XSLT engine is a worthwhile project?


XSLTC

Matts on 2002-05-15T07:40:22

XSLTC is now part of Xerces (or is it Xalan? Why did they have to name them such confusing names???). This guy basically took his ball and went home in a huff, after a fairly long discussion about it on cocoon-dev. Anyway, the upshot was that the Xerces team are now working on it to bring XSLTC up to full XSLT compliance, and iron out a few of the bugs in there. Meanwhile this guy is trying to build and sell a product that nobody is ever likely to buy (IMHO).

XSLT compiled in this manner is very fast, and it makes sense. We had ideas about doing that sort of thing for Perl ages ago, but it would have required a lot of tuits. Barrie Slaymaker has recently done some work on it around his XML::Filter::Dispatch, which dispatches SAX based on XPaths. But mostly he's compiling XPath's into Perl code, rather than full blown XSLT.

Re:XSLTC

jdavidb on 2002-05-15T13:23:25

Wasn't Xalan that alien from Scientology?

XSLT2Perl

darobin on 2002-05-15T12:10:24

I worked on such a project about two years ago, and did manage to get a minimal system (only elements, and just a fragment of XSLT) working before I gave up because while it was a fun project, it wasn't exactly what I needed as we had fast enough XSLT processors appearing.

I think there are two optimisations possible with XSLT (without going into schema analysis, which was the goal of the XPath API project, and is much harder). One is to simplify the patterns in order to be able to stream process the input (what Barrie's working on), the other is to write a compiler with multiple compiler backends (string, SAX, DOM) which, while not all that hard, is still a lot of work.