I want to generate java source or byte
code, which does the similar
transformation, as the XSLT does. I
want to run it on Android, so solution
must be suitable for usage on mobile
platform.
Just take the open source version of Saxon (written entirely in Java).
Saxon 6.5.5 implements XSLT 1.0. Saxon 9.1.07 implements the basic version (not schema-aware) of XSLT 2.0.
Also, one could use the Java byte-code generated or even the Java source code generated.
Recently Michael Kay has been converting Saxon to Javascript, so we may expect soon to have Saxon-JS running on the client (browser) side as a de-facto standard client side XSLT 2.0 processor.