Project

Profile

Help

Extending with instance-level variables

Added by Anonymous over 19 years ago

Legacy ID: #3079069 Legacy Poster: chris (chris1972)

Hello, Using Saxon 8.3, I'm trying to call some methods from an instance of my class. It seems that I can't create an instance variable, and then call its methods. I can only get it to work when I construct the instance in the method call itself. Here's what works ------------------------------ <xsl:value-of select="xlib:test(xlib:new($startDate, $endTime), $startDate2, $endDate2, 5, 10)"/> Here's what doesn't work -------------------------------- <xsl:variable name="calc" select="xlib:new($startDateTime, $endDateTime)"/> <xsl:value-of select="xlib:test($calc, $startDate2, $endDate2, 5, 10)"/> The latter fails with the following message: **** No details for class net.sf.saxon.functions.JavaExtensionLibrary$UnresolvedExtensionFunction at net.sf.saxon.functions.JavaExtensionLibrary$UnresolvedExtensionFunction@147e0ec Any ideas? Thanks!


Replies (2)

RE: Extending with instance-level variables - Added by Anonymous over 19 years ago

Legacy ID: #3079085 Legacy Poster: Michael Kay (mhkay)

I saw this message myself the other day, it indicates an internal problem which I think I've fixed for 8.4. The optimizer is trying to obtain type information for the result of an extension function that hasn't been fully bound to a Java method yet, because there was more than one method with the given name and arity, and not enough type information to resolve between them until a later phase of processing. You can probably get around it by declaring the type of the variable, which will be something like as="java:full.class.name" where xmlns:java="http://saxon.sf.net/java-type".

RE: Extending with instance-level variables - Added by Anonymous over 19 years ago

Legacy ID: #3079164 Legacy Poster: chris (chris1972)

Thanks for the response. Unfortunately, the workaround you mention doesn't seem to work for me. I still get the same error message. That's ok though, I can deal with it until 8.4. I mostly wanted to verify if I was doing something wrong or not.

    (1-2/2)

    Please register to reply