英文:
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:
<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>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论