xsl version 2.0 在 JDK 13 中?

huangapple go评论72阅读模式
英文:

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:

&lt;xsl:stylesheet version=&quot;2.0&quot;
		xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;
		xmlns:fo=&quot;http://www.w3.org/1999/XSL/Format&quot; exclude-result-prefixes=&quot;fo&quot;&gt;

...

&lt;xsl:value-of select=&quot;system-property(&#39;xsl:version&#39;)&quot;/&gt;

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

huangapple
  • 本文由 发表于 2020年8月4日 14:03:04
  • 转载请务必保留本文链接:https://go.coder-hub.com/63241048.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定