Title: Custom XPath Functions Category: documentation ## Introduction ODE uses the Saxon XPath processor to support custom XPath functions. This text is a quick summary of Saxon's own extensibility documentation. I recommend you read it if you need more information. It goes into much more detail on Java invocation, supported data types, conversions, etc. To use XPath extensions, you must use the XPath 2.0 expression language. ## Writing extension functions An extension function is invoked using a name such as ```prefix:localname()```. The prefix must be the prefix associated with a namespace declaration that is in scope. Extension functions must be implemented in Java. You bind external Java classes by encoding the class name part in the namespace URI. The URI for the namespace identifies the class where the external function will be found. The namespace URI must be ```java:``` followed by the fully-qualified class name; for example ```xmlns:date="java:java.util.Date"```). The class must be on the classpath, or more specifically accessible from the current classloader.
xmlns:date="http://www.jclark.com/xt/java/java.util.Date"
). This approach is no longer supported in Saxon 9.x and you should now use the java:
prefix.