Mr. Tedja,
Yes, one of the advantages of using XSLTC is speed. The other is
size. XSLTC compiles XSL stylesheets into one or more small Java
classes, and the uses this/these to perform the actual transformation.
A conventional XSLT processor will transform XML documents like this:
XSL+XML --> [processor] --> *ML
while XSLTC does this in two steps:
XSL --> [compiler] --> translet (a Java 1.1 class)
XML --> [translet] --> *ML
The compiled Java class (the translet) is a Java 1.1 compatible
class (so that it can be run in applets), and it does the actual
transformation assisted by a run-time library (also Java 1.1).
The average size of a translet is 5K, while the size of the runtime
library is about 120K. This bundle will, together with a SAX parser
of your choice) makes a very compact and portable XSL transformation
engine.
But, compiling stylesheets is only of real benefint when the input
stylesheet is relatively static. The compilation phase is fairly slow,
and should not be done more often than strictly needed. The
transformation phase, however, which you will have to run for each
input XML document, is generally faster than with other XSLT processors.
You can read more about XSLTC and Xalan at:
http://xml.apache.org/xalan-j/xsltc_usage.html
Best regards,
Morten Jorgensen
Agustinus Tedja wrote:
>
> I am still a newbie here and it seems XSLTC is getting hot, I want to
> know the background, reason, intent and advantage having XSLTC rather
> than XSLT Processor (Xalan) . Is it concerning speed ?
> Thank you for your responses.
>
> Regards,
> Agustinus Tedja