Project

Profile

Help

Saxon 10.3J: SEF cannot determine Java method

Added by T Hata almost 4 years ago

I've contacted support@ twice regarding the same subject and got no reply, so here it is.

Once exported, this stylesheet stops working. This problem is blocking our migration from 9.9 to 10.

Are there any command line switches or some configuration that make it work on 10?

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output indent="yes" omit-xml-declaration="yes" />
    <xsl:template name="xsl:initial-template">
        <test>
            <xsl:value-of select="
                    resolve-uri('temp.txt')
                    => Q{java:java.net.URI}new()
                    => Q{java:java.io.File}new()
                    => Q{java:java.io.File?void=this}deleteOnExit()
                    => Q{java:java.io.File}getClass()" />
        </test>
    </xsl:template>
</xsl:stylesheet>
C:\SaxonEE10-3J>java -cp saxon-ee-10.3.jar net.sf.saxon.Transform -it -xsl:test2.xsl
<test>class java.io.File</test>

C:\SaxonEE10-3J>java -cp saxon-ee-10.3.jar net.sf.saxon.Transform -export:test2.sef -nogo -xsl:test2.xsl

C:\SaxonEE10-3J>java -cp saxon-ee-10.3.jar net.sf.saxon.Transform -it -xsl:test2.sef
Static error on line 11 of test2.xsl:
  XPST0017  There is more than one method matching the function call new, and there is
  insufficient type information to determine which one should be used
There is more than one method matching the function call new, and there is insufficient type information to determine which one should be used

Replies (2)

RE: Saxon 10.3J: SEF cannot determine Java method - Added by Michael Kay almost 4 years ago

As a first step, I have improved the error message so it now says

XPST0017  There is more than one method matching the function call
  Q{java:java.io.File}new#1, and there is insufficient type information to determine which
  one should be used

So at least we now know which call we are dealing with.

And a look at the SEF file makes it clear that indeed, we don't have enough information to distinguish between new File(String) and new File(URI)

RE: Saxon 10.3J: SEF cannot determine Java method - Added by Michael Kay almost 4 years ago

Transferred here

https://saxonica.plan.io/issues/4840

and fixed. Sorry we dropped the ball on this one, and thanks for creating such a simple repro.

    (1-2/2)

    Please register to reply