Translets — Super-fast XSL transformations
XSL transformations are used in many settings to turn XML data
into presentation data (HTML, XHTML, WML, and so on) or into XML in a different format. If
presentation data is generated on the fly, for example with every
response from an application server, the time needed for the XSL transformation adds up. As a result,
a long-running transformation can overload the application server or cause unreasonably long
response times.
To speed up transformations, Sun Microsystems
originally developed Translets, a technology that lets you compile XSL templates into Java
objects called translets and then use them for XSL transformations. Sun Microsystems passed
the technology on to the Apache XML Project, specifically to its XSLT
processor Xalan.
The XSL transformation benchmarks I ran myself came out strongly in favor of translets.
The speedup was in the range of 30–70%. For example, a transformation done the conventional way
took around one second, and with translets it was down to 0.3 seconds in every case.
If translets interest you or you’d like to try them right away, you can
start with Raghu Donepudi’s article
Supercharge Your Java Web Applications with Translets (via java.net).
If you’re interested in XSL and its uses, I recommend Pavel Sýkora’s series about the Cocoon XML application server.
Related articles
Related articles
Related CZ Podcast episodes
- #217 · Ivo Lukačovič
On Windy, JavaScript and building companies. · Czech audio
- #3 · Java 6 SE, Vývoj webových aplikací
Dagi and Filemon discuss Java 6 and web application frameworks. · Czech audio
- #1 · Vývojová prostředí v Javě
The first CZ Podcast episode looks at Java development environments. · Czech audio