开发者

Java code generator from XSLT

Is there an开发者_高级运维y tool that can generate java code from XSLT?

UPD

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.


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.


I have done it using XML files to define objects and then using XSLT to transform to beans, forms, struts classes, DB tables etc but in my mind it is a long way to go for about the same amount of effort as writing the code using cut and paste... Sadly it is commercial so I can't share it :( A bit long in the tooth but XDoclet is also useful for code generation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜