I am trying to use the format-number function from XQuery/XPath 3.0.
According to Saxon documentation, this is supported from v9.3-9.4.
I'm using Saxon-EE 9.5:
<dependency>
<groupId>com.saxonica</groupId>
<artifactId>Saxon-EE</artifactId>
<version>9.5.1-3</version>
</dependency>
A very simple test throws an exception with the following error:
@Test
public void testFormatNumber() throws SaxonApiException {
Processor proc = new Processor(false);
XQueryCompiler comp = proc.newXQueryCompiler();
XQueryExecutable exp = comp.compile("format-number(number('123.4'),'#.00000000')");
}
This throws the following error:
Error on line 1 column 0
XPST0017 XQuery static error near #...(number('123.4'),'#.00000000')#:
System function format-number#2 is not available with this host language/version
This works using Saxon-HE-9.6.0-4, but I need the EE edition to do Schema Validation, and Saxon-EE 9.5.1-3 is the version we have the license for.
Any solution around Saxon-EE? Is there any alternative mature library that supports XQuery 3.0 & Schema Validation?