Hi Rohit,
>I understand we need 4 things to get a transformation: source, result,
>xsl file and a transformer.
In principal, yes. You pass the xsl file (the stylesheet) to the
factory function that returns a new transformer, and then you pass your
desired source and result as arguments to the transform method of your
transformer.
>1) I'm not sure what purpose Xalan serves? Is it an alternate more
>efficient Transformer that can be used ?
It is an xslt engine, yes. It can be used by a java program to perform
an xsl transformation. It might even be the one that your java
installation already uses (that will depend on your jre version). I use
java 1.4.2_08. In my rt.jar, i have a package org.apache.xalan. I am
not sure about the version.
>2) This O'Reilly example (Ex 5-3)
>...
>says "was developed and tested using Apache's Xalan 2 processor". But I
>dont see any non Java packages/objects used to do the transformation.
>What role is Xalan playing here?
The O'Reilly text should have answered your question. When you want to
perform an xsl transformation with java, you should NOT write "give me
an object of the xsl transformer xyz", because that might not work on
other machines where "xyz" is not installed. Instead you say "give me
an object of the default transformer that is installed on this system".
That will work independently of the current installation, provided that
it conforms to the TrAX specification.
>3) Some confusion with regards to transformer and processor. Some
>examples have processors used, some don't. When do we need one? Do the
>processors only serve to read input/output sources?
In general, I´d say that these two termini can be used similarly. One
COULD say "processing" includes all steps starting from reading the
inout and ending with writing the output and that "transforming" only
includes the transformation of one DOM tree to another, but that´s
close to splitting hairs imho.
>4) And engines. Can Xalan, Saxon be called XSLT engines?
IMHO, yes. Don´t call them XSLT transformation engines ("eXtensible
Stylesheet Language for Transformation transformation engines" ;-) ).
Also avoid to talk about "LCD displays" ;-).
HTH
Piet