Is it possible to register a "simple interface" Java extension function
Posted: Sat Nov 02, 2019 12:48 am
To be clear, I'm using the terminology in Saxon's documentation. The "simple interface" refers to implementations of "net.sf.saxon.s9api.ExtensionFunction" and "full interface" to implementations of "net.sf.saxon.lib.ExtensionFunctionDefinition".
I have a number of extension functions implemented using Saxon's simple interface for defining Java-based extension functions. I'd like to make these available when executing stylesheets that make use of them with Oxygen. I see that by packaging an implementation of the "full interface" with some SPI voodoo and setting the JAR as an extension in the transformation scenario works.
I tried to use a Saxon initializer ("net.sf.saxon.lib.Initializer") to register the functions. However, I suspect that either Oxygen does not use s9api internally or it does not expose the underlying API instance (whatever type it is), since the getProcessor() method of the Configuration object that was given to my initializer returns null.
Is there a way to use simple interface implementations in Oxygen?
More generally, is there a way to use s9api to configure how Saxon runs within Oxygen?
I have a number of extension functions implemented using Saxon's simple interface for defining Java-based extension functions. I'd like to make these available when executing stylesheets that make use of them with Oxygen. I see that by packaging an implementation of the "full interface" with some SPI voodoo and setting the JAR as an extension in the transformation scenario works.
I tried to use a Saxon initializer ("net.sf.saxon.lib.Initializer") to register the functions. However, I suspect that either Oxygen does not use s9api internally or it does not expose the underlying API instance (whatever type it is), since the getProcessor() method of the Configuration object that was given to my initializer returns null.
Is there a way to use simple interface implementations in Oxygen?
More generally, is there a way to use s9api to configure how Saxon runs within Oxygen?