Page 1 of 1

Saxon PE/EE configuration within oXygen 11

Posted: Sat Oct 17, 2009 8:34 am
by Fabini
Does anyone know how to set the Saxon PE/EE configuration within oXygen 11?

I am in the process of creating and testing a number of XSLT extension functions within Saxon and I need to be able to register them with the Saxon Processor.

I've tried using the extensions dialog within the oXygen XSLT transformation to point to the Saxon jarfile and to a .conf file but without success.

Thanks in advance for any ideas,

Fabini

Re: Saxon PE/EE configuration within oXygen 11

Posted: Mon Oct 19, 2009 4:00 pm
by sorin_ristache
Hello,

You have to add the jar file(s) that contain the XSLT extensions to the transformation scenario using the Extensions button of the dialog for editing a scenario. Also other advanced Saxon 9 options can be set in the dialog opened from the Advanced options button. The current version of Oxygen (11.0) does not read the Saxon options from a .conf file but we will consider that for a future version.


Regards,
Sorin

Re: Saxon PE/EE configuration within oXygen 11

Posted: Mon Oct 19, 2009 6:24 pm
by Fabini
Sorin,

Thanks for the reply, but your suggested technique doesn't work for me. I include a jar file of extension functions in the XSLT transformation dialog, but I get a Saxon EE 9.2.0.2 error "Cannot find a matching 0-argument function named {http://fabini/saxon/functions}uuid()".

I know the jar file works because it is used with Saxon HE in a Java XSLT transformation I have constructed.

I'm puzzled because in Java, I register each extension function with the Saxon Processor object using its class constructor. How does oXygen find these classes? Does it scan every class file in the jar looking for classes that implement net.sf.saxon.functions.ExtensionFunctionDefinition?

Is there some namespace I should be using within the XSLT (other than the namespace I have defined for the extension function) ?


Fabini

Re: Saxon PE/EE configuration within oXygen 11

Posted: Tue Oct 20, 2009 3:48 pm
by sorin_ristache
Hello,

The custom extension functions implemented in Java and added to the transformation scenario using the Extensions button should be loaded when the XSLT transformation is executed. Can you send sample files (a sample XSLT stylesheet, a sample XML file and a jar file with your custom extension function) for reproducing the error?


Regards,
Sorin

Re: Saxon PE/EE configuration within oXygen 11

Posted: Tue Oct 20, 2009 7:39 pm
by Fabini
Hello sorin,

I've loaded all the files you requested, together with the source code for my Saxon extension function, the resulting XML when the transformation is run using Java and the Saxon9HE API, and the oXygen error message when the function is used as an extension.

Thank you for your time and help with this,

Fabini

Re: Saxon PE/EE configuration within oXygen 11

Posted: Thu Dec 24, 2009 2:59 pm
by Fabini
This issue is now solved in oXygen 11.1 - thank you Sorin.

To employ extension functions, use the "Configure Transformation Scenario" to edit the transformation scenario for you XSLT transformation as follows:

(1) Using the "Extensions" dialog, add the Jar file that contains your Saxon extensions.

(2) Use the "Advanced Option" dialog (the button with a whizzy little gear wheel icon), check the "Use a configuration file" check box and point to the URL of a configuration file which will look something like

Code: Select all


<configuration xmlns="http://saxon.sf.net/ns/configuration">
<resources>
<extensionFunction>name.of.your.saxon.function.definition</extensionFunction>
</resources>
</configuration>
Once again, thank you Sorin.


Fabini