Page 1 of 1

Problems with refelxive extension functions (clitype)

Posted: Sun Apr 22, 2018 10:59 pm
by FJJCENT
Hello, I am having a problem working with Saxon 9.2 PE and reflexive extension functions, and I see that there is a lot of people with the same problem, so based on the System.Math example I have done a very simple project with only a class Employee inside a library called LibEmployees and the Employee calse only contains an static method GetName with yields a string value

I expose the code
the class --> LibEmployees. Employee
public class Employee {
public static string GetName()
{
return "Frank";
}
}

and theXLS file
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
xmlns:faux="clitype:libEmployees.Employee?from=file:///E:/WpfPruebasBDE/libEmpleados\bin/Debug/libEmployees.dll"
xmlns:xs="urn:schemas-microsoft-com:datatypes">

<xsl:output method="xml" indent="yes"/>

<xsl:template match="/">
Name: <xsl:value-of select="faux:Employee.GetName()"/>
</xsl:template>

</xsl:stylesheet>

And in spite of its simplicity I always receive the error message of
Cannot find a matching 1-argument function named {clitype:libEmployyes.Employee?from=file:///E:/WpfPruebasBDE/libEmployees\bin\Debug\libEmployees.dll}Employee.GetName().

Please help me to see which is my fail, I'm not abe of find it.

Regards

Re: Problems with refelxive extension functions (clitype)

Posted: Tue Apr 24, 2018 3:50 pm
by adrian
Hi,

Are you running this in Oxygen, or in the command line?
In the command line, add the -TJ argument to turn on tracing of the binding of calls.
https://www.saxonica.com/html/documenta ... xtensions/

Regards,
Adrian

Re: Problems with refelxive extension functions (clitype)

Posted: Tue Apr 24, 2018 10:58 pm
by FJJCENT
I've just solve it using ?asm= instead of ?file= and registering the libEmp in the GAC, and it works well in Visual Studio 2015 but not in Oxygen, I think that this kind of extensive functions are not compatible with Oxygen