Problems with refelxive extension functions (clitype)

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
FJJCENT
Posts: 18
Joined: Sun Apr 22, 2018 10:17 pm

Problems with refelxive extension functions (clitype)

Post by FJJCENT » Sun Apr 22, 2018 10:59 pm

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

adrian
Posts: 2575
Joined: Tue May 17, 2005 4:01 pm

Re: Problems with refelxive extension functions (clitype)

Post by adrian » Tue Apr 24, 2018 3:50 pm

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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

FJJCENT
Posts: 18
Joined: Sun Apr 22, 2018 10:17 pm

Re: Problems with refelxive extension functions (clitype)

Post by FJJCENT » Tue Apr 24, 2018 10:58 pm

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

Post Reply