problem resolving extension function in XSLT
Added by Anonymous over 15 years ago
Legacy ID: #7452524 Legacy Poster: kendall shaw (queshaw)
I have extension functions declared like: public class Blah { public static Map newBlah() { return new HashMap(); } public static String blah(String s, Map m) { return s; } public static String blah(String s, String s2, Map m) { return s; } public static String blah(String s, String s2) { return s; } public static String blah(String s, URI u) { return s; } public static String blah(String s) { return s; } } in the xslt there is: <xsl:variable name="a" select="ext:newBlah()"/> <xsl:value-of select="ext:blah('blah', $a)"/> And I get an error that multiple methods match the signature and there is insufficient type information supplied to distinguish between them. Is there any way to get this to work without changing the extension function method signatures?
Replies (1)
RE: problem resolving extension function in XSLT - Added by Anonymous over 15 years ago
Legacy ID: #7452963 Legacy Poster: Michael Kay (mhkay)
Try declaring the variable as <xsl:variable name="a" select="ext:newBlah()" as="type:java.util.Map" xmlns:type="http://saxon.sf.net/java-type"/>
Please register to reply