#815 Supplying external object as parameter

v9.0
closed
Michael Kay
5
2012-10-08
2008-04-29
Michael Kay
No

It should be possible to supply an "external object" as the value of a stylesheet parameter or external Query variable, so that extension functions can be invoked as instance methods on that object. When you try to do this, you get the error "cannot convert to an external type".

A patch to module Bindery is being raised in Subversion. With this change, you can do for example

declare namespace jt = 'http://saxon.sf.net/java-type';
declare namespace func='java:test.waters.XQueryFunctions';
declare variable $t2 as jt:test.waters.XQueryFunctions external;

then

func:testMethod($t2)

where "testMethod" is a zero-argument instance method defined on class test.waters.XQueryFunctions.

Discussion

  • Michael Kay
    Michael Kay
    2008-05-12

    Logged In: YES
    user_id=251681
    Originator: YES

    Fixed in 9.0.0.5