<oXygen/> User Guide |
Both the Xalan and Saxon processors support the use of extension elements and extension functions. Unlike a literal result element, which the stylesheet simply transfers to the result tree, an extension element performs an action. The extension is usually used because the xslt stylesheet fails in providing adequate functions to the user for accomplishing a more complex task.
Samples on how to use extensions can be found at:
http://xml.apache.org/xalan-j/extensions.html
http://saxon.sourceforge.net/saxon6.5.2/extensions.html
The following needs to be accomplished in order for the transformer to find and use succesfully the Java extension classes:
Set the property "com.oxygenxml.additional.classpath" to contain the additional paths to the directories containing the used Java extension classes or jars.
Example of setting two directories called "test1" and "test2" located in the <oXygen/> root directory as extension paths (containing the extension classes or jars):
For users who use a script ( bat or sh ) to start <oXygen/> add the following parameter "-Dcom.oxygenxml.additional.classpath=test1;test2" to the java command line in your script file (oxygen.bat or oxygen.sh). Example: "java -Xmx256m -Dcom.oxygenxml.additional.classpath=test1;test2; -cp %CP% ro.sync.exml.Oxygen %1 %2 %3 %4 %5" .
For users who use an executable ( exe ) to start <oXygen/> add the following parameter "com.oxygenxml.additional.classpath=test1;test2" to the "oxygen.lax" file situated in the <oXygen/> root directory.
After the parameter is set, Java classes and jars from the extension paths are dinamically loaded and can be used by the transformer processors with no extra setting.