XSLT stylesheets compiled directly into Java bytecodes are called translets. We have used the term originally at Sun Microsystems when we created XSLTC.
Gregor differs from XSLTC (and therefore from Apache XALAN) in that it is an optimizing compiler. Compiling directly to JVM bytecodes (instead of going through Java intermediate code) has two benefits:
- the compilation process is faster which can be useful with dynamic queries
- the final code is generally faster as we can generate code with many GOTO shortcuts, a programming language feature not available in Java! A corollary (for the techies): translets generally cannot be decompiled into Java code, as no valid Java code could produce them! Added IP protection is thus an unplanned benefit of direct compilation to Java "assembly language."