与xml + xslt相关的最佳java Web应用程序框架是什么? [英] What is the best java web application framework that goes well with xml+xslt?

查看:115
本文介绍了与xml + xslt相关的最佳java Web应用程序框架是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近学到了一些关于xml / xslt的内容,并希望在我的web项目中尝试一下。你会为此推荐什么框架?基本上,我想生成一个动态的xml,它将应用于客户端的xslt样式表。

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是我的第一个候选人,但它主要是以html为中心的。还没设法让我的想法发挥作用。

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

推荐答案

如果你想在客户端将XSLT样式表应用到从服务器收到的XML(不像你写的那样:))你只需要将纯XML返回给客户端

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 ... ?>

构建嵌入式。

如果你想要将XSLT应用于服务器端的XML并将HTML返回给客户端 - 请不要打扰。我们在二十一世纪的早期阶段就已经完成了这一点 - 它不是一个可维护的解决方案,而且很难调试。
但是如果你想要(服务器端解决方案),我还推荐SpringMVC的XLST视图。
还有经典和称为 Cocoon 的硬核解决方案,它实现了XML pipieline - 从架构的角度来看它很不错,但在真实的项目中使用它真的很难,经典的MVC更适合。

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.

这篇关于与xml + xslt相关的最佳java Web应用程序框架是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆