What is the best java web application framework that goes well with xml+xslt?

一笑奈何 提交于 2019-12-19 10:19:29

问题


I recently learned a bit about xml/xslt and would like to try it in my web project. What framework would you recommend for that? Basically, I want to generate a dynamic xml that will be applied to xslt stylesheet on the client side.

Wicket was my first candidate, but it is primarily html-centric. Didn't manage to get my idea work yet.


回答1:


If you want XSLT stylesheets to be applied on the client-side to XMLs received from server (not opposite as you've written :)) you just have to return pure XML to the client with

<?xml-stylesheet ... ?>

construct embedded.

If you want to apply XSLTs to XMLs at server-side and return HTML to client - please dont' bother. We've been through this in very early years of XXI century - it's not very maintainable solution and very hard to debug. But if you want that (server-side solution), I also recommend SpringMVC's XLST view. There's also classic and hard-core solution called Cocoon which implements XML pipieline - it's nice from architectural point of view, but it's really hard to use in real projects, were classic MVC is more suitable.




回答2:


Spring MVC has support for XSLT views (reference docs).




回答3:


Try ReXSL, which is XML+XSL web development framework, with a classic MVC pattern.



来源:https://stackoverflow.com/questions/671297/what-is-the-best-java-web-application-framework-that-goes-well-with-xmlxslt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!