XML/XSLT/Xpath 标准合规性
我们的商店开发了多个核心产品和客户特定实施的平台。该平台已经存在 5 年了,现在我们正在尝试重新思考/重新构建平台。作为平台所有者,以下是我计划遵守的几个关键原则
- 尽可能接近 Java EE 规范
- 限制或消除对 第三方库
- 使合同明确 平台组件,如果可能的话 然后将其制作为符合 osgi 的捆绑包
- 符合标准(例如 非 Java EE 的东西)
所以我们很大程度上依赖 JAXP 和 XSLT 进行转换。当我们在不同供应商的应用程序服务器以及来自同一供应商的不同版本的应用程序服务器上进行部署时,我们经常遇到 XSLT 样式表问题。大多数时候问题是
- 在 XSLT 中使用 parser-impl 特定的东西
- 在应用程序中捆绑解析器实现
- 使用 XSLT 2.0/XPath 2.0 与 JAXP 1.3 等
我需要一些帮助在下面
- 我在哪里可以检查我的 XSLT 的合规性对于 1.0,因为 JAXP 1.4 仅支持 XSLT 1.0 和 Xpath 1.0?
- 是否有 XSLT 1.0 支持的功能等列表(我正在寻找类似于 XSLT 和 XPath 的 javadoc 的内容)
Our shop develops platform on which multiple core products and customer specific implementations are built. The platform has been around for 5 years and now we are trying to re-think/re-platform. As the platform owner, below are the few key principles I am planning to adhere to
- Be as close as possible to the Java EE spec
- Limit or eliminate dependencies on
3rd party libraries - Make the contracts explicit of the
platform components and if possible
make then as osgi compliant bundles - Be compliant to the standards (for
non Java EE stuff)
So we depend lot on JAXP and XSLT for transformations. We had frequent issues with the XSLT style sheets when we were deploying on different vendor app servers and also different versions of the app server from same vendor. Most of the time the issues are
- Using parser-impl specific stuff in XSLT
- Bundles the parser implementations with-in the app
- Using XSLT 2.0/XPath 2.0 with JAXP 1.3 etc etc
I need some help in below
- Where can I check the compliance of my XSLT's for 1.0 as JAXP 1.4 supports onlty XSLT 1.0 and Xpath 1.0?
- Is there a list of supported finctions etc for XSLT 1.0 (I am looking something similar to javadoc for XSLT and XPath
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
检查特定 XSLT 代码是否符合要求的最佳方法之一是使用(多个)兼容的 XSLT 处理器。例如,如果您的代码在 Saxon 6.5.5 和 MSXML4/6 上成功运行,则几乎可以肯定您的代码是合规的。
支持的标准XSLT 1.0和 XPath 1.0 函数在相应规范中指定。此外,Jesper Tverskov 的这项调查也非常有用。
One of the best ways to check particular XSLT code for compliance is to use (more than one) compliant XSLT processors. For example, it is almost certain that your code is compliant if it runs successfully with both Saxon 6.5.5 and MSXML4/6.
The standard supported XSLT 1.0 and XPath 1.0 functions are specified in the corresponding specifications. Also this survey by Jesper Tverskov can be very useful.