What is the best java web application framework that goes well with xml+xslt?(与 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(与您所写的相反 :)),您只需要使用
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 返回给客户端 - 请不要打扰.我们在 21 世纪的早期就经历过这种情况——它不是非常可维护的解决方案,而且很难调试.但如果你想要(服务器端解决方案),我也推荐 SpringMVC 的 XLST 视图.还有 classic 和名为 Cocoon 的核心解决方案,它实现了 XML 管道 - 这很好从架构的角度来看,但在实际项目中确实很难使用,经典的 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 应用程序框架是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:与 xml+xslt 完美搭配的最佳 Java Web 应用程序框架是什么?
基础教程推荐
- 设置 bean 时出现 Nullpointerexception 2022-01-01
- 减少 JVM 暂停时间 >1 秒使用 UseConcMarkSweepGC 2022-01-01
- 在 Libgdx 中处理屏幕的正确方法 2022-01-01
- “未找到匹配项"使用 matcher 的 group 方法时 2022-01-01
- 如何使用 Java 创建 X509 证书? 2022-01-01
- 无法使用修饰符“public final"访问 java.util.Ha 2022-01-01
- Java:带有char数组的println给出乱码 2022-01-01
- FirebaseListAdapter 不推送聊天应用程序的单个项目 - Firebase-Ui 3.1 2022-01-01
- 降序排序:Java Map 2022-01-01
- Java Keytool 导入证书后出错,"keytool error: java.io.FileNotFoundException &拒绝访问" 2022-01-01