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.
Extensions for Xalan and Saxon are included in [<oXygen/> install directory] \frameworks\docbook\xsl\extensions. If you want to use the extensions group for Xalan, you have to rename the file "xalan25.jar.ext" to "xalan25.jar". Same specifications for Saxon: rename "saxon653.jar.ext" to "saxon653.jar". You can only use one group of extensions at a time.
Samples on how to use extensions can be found at:
for Xalan - http://xml.apache.org/xalan-j/extensions.html
for Saxon 6.5.5 - http://saxon.sourceforge.net/saxon6.5.5/extensions.html
for Saxon 8.9.0.3 - http://www.saxonica.com/documentation/extensions/intro.html
In order to ease the configuration of XSLT processor extension path, you can use the Extensions button of the scenario edit dialog.
As alternative the manual configuration must be performed with the following steps in order to find and use successfully 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 a directory called "test1" containing extension classes and a jar "test2/ext.jar" located in the directory C:\work\ext\ :
For users who use a script ( bat or sh ) to start <oXygen/>
add the following parameter
"-Dcom.oxygenxml.additional.classpath=C:/work/ext/test1;C:/work/ext/test2/ext.jar"
to the java command line in your script file
(oxygen.bat
or oxygen.sh
).
Example: "java -Xmx256m
-Dcom.oxygenxml.additional.classpath=C:/work/ext/test1;C:/work/ext/test2/ext.jar
-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=C:/work/ext/test1;C:/work/ext/test2/ext.jar"
to the oxygen.ini
file situated in the
<oXygen/> install directory.
After the parameter is set, Java classes and jars from the extension paths are dynamically loaded by <oXygen/>