New XSLT Technologies Debut

June 21, 2000

Leigh Dodds

XSLT was a prominent feature of the XML Europe 2000 conference. This article looks at two innovative XSLT technologies presented at the conference in Paris last week.

XSLT Compiler

A big draw at the Sun Microsystems stand in the conference exhibition was the demonstration of an XSLT compiler. The compiler is capable of taking an XSLT style sheet and generating pure Java classes called "translets." The compiled translets showed impressive performance in comparison to XT, widely regarded as one of the fastest XSLT engines. The translets do not run as part of a style sheet engine, giving them a very low footprint--developers were treated to a demonstration of the translets running on a palmtop.

At present, the compiler only supports a subset of the full XSLT language, although it wasn't clear which features are not yet implemented. Development of the tool is continuing, and it's expected that a fully conformant implementation will be available by the end of July. Prior to this, Sun will be releasing the demonstration version of the technology, complete with source code, at the end of the month. The compiler will be available from the Sun Developers' Corner.

The Sun developers will also be seeking feedback on the tool, and suggestions from the XSLT community for additional features. One suggestion that has already been made is the ability to obfuscate the compiled code--allowing XSLT developers to protect the source of their transformations, something they are currently unable to do.

XSLT Virtual Machine

In an interesting presentation on the last day of the conference, Anguel Novoselsky of Netfish Technologies introduced an architecture for an XSLT Virtual Machine (XSLTVM), developed in a project by Oracle.

The presented architecture was fairly standard: a compiler takes an XSLT style sheet and produces bytecode, which encodes simple machine instructions that will carry out the transformation. The bytecode is then executed by a virtual machine to effect the transformation. This means that the bytecodes produced by the compiler are platform-independent, just like Java classes.

The design approach taken separated the XSLT operations into those that could be achieved at compile-time, and those that were run-time. This gave the immediate advantage of allowing very fine control over memory allocation in the processor. Novoselsky believed that one flaw in current XSLT processors is that they use fairly high-level instructions, which mix run-time and compile-time operations.

Novoselsky was of the opinion that a lack of scientific rigor made XSLT more of a "toy" language than it could be. XSLTVM could potentially allow side-effects (e.g., variables could be assigned multiple times), something that the XSLT language currently doesn't allow. Throughout the talk, Novoselsky stressed that the techniques applied to produce XSLTVM are standard in the compiler and virtual machine design communities.

Observing that in many applications the input and output formats for a transformation are known in advance, Novoselsky pointed out that further optimizations could be applied: particularly if the formats are described using XML Schemas. The direct result of this would be the ability to allow serial processing of the transformation, meaning that SAX could be used as both the input and the output for the virtual machine. This not only removes the need to build an inefficient DOM tree, but would allow streaming of an XSLT transformation: a "holy grail" that has been a frequent topic on many developer mailing lists.

The project is being continued at Oracle by the paper's co-author, K. Karun. It's unclear whether the virtual machine will be available in the future as a separate application, but the lessons learnt from the production of XSLVM are being applied to enhance Oracle's XSLT processor.


XSLT has now become part of the standard XML toolkit. In almost every business or technical framework presented at the conference, XSLT featured as a component. Developers are actively using this tool and are keen to see it mature. The XSLT Birds of a Feather (BOF) sessions that took place every lunchtime at XML Europe were well attended.

With developers making serious use of XSLT, it's unsurprising that limits in performance are already being pushed. Technologies like the XSLT compiler and virtual machine are hot topics: the future is definitely bright for XSLT.