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

103 views Asked by At

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?

2

There are 2 answers

1
Conal Tuohy On

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>
2
Phillip On

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.