Cannot find a 1-argument function named Q{http://exslt.org/math}max(). External function calls have been disabled

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

Cannot find a 1-argument function named Q{http://exslt.org/math}max(). External function calls have been disabled

问题

我尝试根据我的XSLT转换一封信,但出现错误:

> 找不到名为Q{http://exslt.org/math}max()的单参数函数。
> 外部函数调用已禁用。

顺便说一下,我正在使用XSLT 1.0

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:math="http://exslt.org/math" xmlns:exsl="http://exslt.org/common" xmlns:xalan="http://xml.apache.org/xalan" extension-element-prefixes="exsl">

我尝试将xmlns:math="http://exslt.org/math"更改为xalan math,但仍然出现错误:

> 外部函数调用已禁用。

你知道这是否与权限有关,或者可能是属性文件?

英文:

I'm trying to transform a letter based on my XSLT and it is giving me an error:

> Cannot find a 1-argument function named Q{http://exslt.org/math}max().
> External function calls have been disabled.

I'm using XSLT 1.0 by the way.

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:math="http://exslt.org/math" xmlns:exsl="http://exslt.org/common" xmlns:xalan="http://xml.apache.org/xalan" extension-element-prefixes="exsl">

I tried changing the xmlns:math="http://exslt.org/math" to xalan math but still getting the error:

> External function calls have been disabled.

Any idea if it's permissions related or probably a properties file?

答案1

得分: 1

看起来我从Saxonica得到了答案。除了常规函数之外,exsl:math和其他函数仅在Saxon-PE或Saxon-EE中可用,目前我们服务器上使用的Saxon-HE中没有这些函数。我会与我们的网络/系统团队讨论这个发现。感谢Conal和Michael的所有帮助和建议。

英文:

It seems like I got my answer from Saxonica. exsl:math and other functions except common are only available in Saxon-PE or Saxon-EE and is not available in what we have currently in the server which is Saxon-HE.
I'll discuss this finding with our network/system team. Thanks for all the help and tips Conal and Michael.

答案2

得分: 0

你正在运行哪个XSLT处理器?是Saxon吗?

如果是的话,您需要检查此配置设置是否已启用:
https://www.saxonica.com/documentation12/index.html#!configuration/config-features@ALLOW_EXTERNAL_FUNCTIONS

如果您不知道处理器是什么(例如,如果嵌入在其他软件中),请尝试运行此样式表:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

  <xsl:template match="/">
    <version
      vendor="{system-property('xsl:vendor')}"
      version="{system-property('xsl:version')}"
      vendor-url="{system-property('xsl:vendor-url')}"/>
  </xsl:template>
  
</xsl:stylesheet>
英文:

What XSLT processor are you running? Is it Saxon?

If so, you'll want to check this configuration setting is enabled:
https://www.saxonica.com/documentation12/index.html#!configuration/config-features@ALLOW_EXTERNAL_FUNCTIONS

If you don't know what the processor is (e.g. if embedded in some other software), trying running this stylesheet:

&lt;xsl:stylesheet xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot; version=&quot;1.0&quot;&gt;

  &lt;xsl:template match=&quot;/&quot;&gt;
    &lt;version
      vendor=&quot;{system-property(&#39;xsl:vendor&#39;)}&quot;
      version=&quot;{system-property(&#39;xsl:version&#39;)}&quot;
      vendor-url=&quot;{system-property(&#39;xsl:vendor-url&#39;)}&quot;/&gt;
  &lt;/xsl:template&gt;
  
&lt;/xsl:stylesheet&gt;

huangapple
  • 本文由 发表于 2023年4月17日 08:50:20
  • 转载请务必保留本文链接:https://go.coder-hub.com/76031038.html
匿名

发表评论

匿名网友

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

确定