I have my own java static function in a class:
package com.test;
public class A {
public static void returnSameNodes(Object nodes){
return nodes;
}
}
I tried to bind this function to XSLT:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:ext="java:com.test.A" >
<xsl:template match="root">
<xsl:apply-templates select="ext:returnSameNodes(//child::*)"></xsl:apply-templates>
</xsl:template>
</xsl:stylesheet>
, but with the following error:
Cannot find a matching 1-argument function named etc.
I know what I'm doing wrong - I have to tell saxon(9B) that my class is in particular location, but I don't know how to do this. Any suggestions?? Including for example Math.sqrt() works great. Thanks
EDIT: The problem is setting up Java class path,anybody knows how to do this for this particular case? There is a note in a following link about setting a classpath variable, but how? http://www.saxonica.com/documentation/extensibility/functions.xml Thank you for suggestions