英文:
xsl version 2.0 in JDK 13?
问题
我正在尝试在openJDK 13和apache FOP中使用XSL版本2.0。
尽管在样式表中编写了以下内容:
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="fo">
...
<xsl:value-of select="system-property('xsl:version')"/>
返回的结果仍然是"1.0"。
我该如何在这个环境中启用XSL版本2.0?
英文:
I'm trying to use XSL Version 2.0 with openJDK 13 & apache FOP.
Despite having coded the following in the Stylesheet:
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="fo">
...
<xsl:value-of select="system-property('xsl:version')"/>
...is returning "1.0"
How can I get XSL Version 2.0 running in this environment?
答案1
得分: 1
在Java环境中获得XSLT 2或现在的XSLT 3支持的常见方式是将Saxon 9或Saxon 10 HE添加到类路径中。Saxon HE可在SourceForge或Maven上获得。我认为版本9.8、9.9和10都针对Java 8,但应该能够在后续的Java JRE和JDK上运行,因为它们保持了向后兼容性。
英文:
The usual way in the Java environment to have XSLT 2 or these days XSLT 3 support is to put Saxon 9 or Saxon 10 HE on the class path. Saxon HE is available on SourceForge or Maven. I think the releases 9.8, 9.9 and 10 all target Java 8 but should run as well with later Java JREs and JDKs as these maintain backwards compatibility.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论